Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hi, i have a question, how come the code I type and the code the sybase debugger shows are different. The code I typed

 DECLARE LOCAL TEMPORARY TABLE cr_temp ( Name varchar(60),
                                            PartTypeNo varchar(30),
                                            Description varchar(60),
                                            JdnObjectNo varchar(100),  
                                            Brand varchar(40),
                                            ArticleReference varchar(100),
                                            State varchar(100),
                                            StatusCode varchar(15),
                                            ActualQTY numeric(16,2),
                                            QuantityInStock numeric(16,2),  
                                            QuantityReserved numeric(16,2),
                                            QuantityRequested numeric(16,2),
                                            QuantityAvailable numeric(16,2),
                                            StockItemID numeric(16,0),
                                            InventorylistID numeric(16,0),
                                            StockItemAllocatedToID numeric(16,0),
                                            Kardex varchar(8),
                                            Length numeric(5,2),
                                            Width numeric(5,2),
                                            Heigth numeric(5,2),
                                            Weigth numeric(16,2),
                                            Depreciationcode varchar(3),
                                            Value numeric(16,2),
                                            Value_Date date,
                                            ContainerListID numeric(16,0),
                                            ExtSerialNo varchar(40),
                                            MobilisationListID numeric(16,0),
                                            ATSValue numeric(16,2),
                                            ATSWeight numeric(16,2),
                                            CalibrationInfo varchar(30),
                                            Remarks varchar(2000)
                                          );

The code the debugger shows

declare local temporary table cr_temp(
    Name varchar(60) not null,
    PartTypeNo varchar(30) not null,
    Description varchar(60) not null,
    JdnObjectNo varchar(100) not null,
    Brand varchar(40) not null,
    ArticleReference varchar(100) not null,
    State varchar(100) not null,
    StatusCode varchar(15) not null,
    ActualQTY numeric(16,2) not null,
    QuantityInStock numeric(16,2) not null,
    QuantityReserved numeric(16,2) not null,
    QuantityRequested numeric(16,2) not null,
    QuantityAvailable numeric(16,2) not null,
    StockItemID numeric(16) not null,
    InventorylistID numeric(16) not null,
    StockItemAllocatedToID numeric(16) not null,
    Kardex varchar(8) not null,
    Length numeric(5,2) not null,
    Width numeric(5,2) not null,
    Heigth numeric(5,2) not null,
    Weigth numeric(16,2) not null,
    Depreciationcode varchar(3) not null,
    Value numeric(16,2) not null,
    Value_Date date not null,
    ContainerListID numeric(16) not null,
    ExtSerialNo varchar(40) not null,
    MobilisationListID numeric(16) not null,
    ATSValue numeric(16,2) not null,
    ATSWeight numeric(16,2) not null,
    CalibrationInfo varchar(30) not null,
    Remarks varchar(2000) not null,) on commit delete rows;

declare local temporary table QrySIATActualState(
    inventorylistid numeric(16) not null,
    statuscode varchar(5) not null,
    colorcodeid numeric(16) not null,
    code varchar(10) not null,
    quantity numeric(16,2) not null,) on commit delete rows;

As you can see the 'not null' is added for every field. To make matters even stranger, the allows_null_by_default is on. Any idea's on how to solve this.

Thx

asked 03 Jul '13, 05:01

DIMITRIDEPROFT's gravatar image

DIMITRIDEPROFT
61229
accept rate: 0%

edited 03 Jul '13, 08:56

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297


FWIW, the docs on the allows_null_by_default option tell that this option (usually ON) is

Off for Sybase Open Client and jConnect connections

May this be an issue here?

permanent link

answered 03 Jul '13, 05:29

Volker%20Barth's gravatar image

Volker Barth
40.2k361550822
accept rate: 34%

converted 14 Mar '22, 09:20

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×27
×5

question asked: 03 Jul '13, 05:01

question was seen: 2,318 times

last updated: 03 Jul '13, 08:56