Arnswald, Silke wrote

 

Hello, 

I found a strange behavior when selecting data from a table 
that contains a column with DEFAULT=SERIAL and 
that column is not the last column in the table. 

My configuration: 
        Server: 7.6.0.10 on SUSE Linux 9.3 
        Client: Windows 2000 with SqlStudio 7.6.00.3 and 
                  ODBC 7.6.0b010 via Microsoft Generic OleDb for ODBC
provider 
                (both give same results) 

An excerpt of the ODBC-Tracefile (when trying with SqlStudio) is
attached. 

Kind regards, 
        Silke Arnswald 

 

I assume the installation parameter COLUMNCOMPRESSION has the value YES
in your DB.

Please change it to NO and try again. If this helps, this is a known bug
fixed with 7.6.00.12, which will be available 

last week of July.

 

Elke

SAP Labs Berlin

<<SqlSerial.log>> 
Example to reproduce: 
--------------------------------------------------------- 
CREATE TABLE test( 
col1               Char (4) ASCII    NOT NULL, 
col2               Char (4) ASCII, 
col3               Fixed (6,0)    DEFAULT SERIAL (1), 
col4               Char (4) ASCII, 
col5               Char (4) ASCII, 
PRIMARY KEY (col1)) 
// OK 
insert into test (col1,col2,col4,col5)
values('col1','col2','col4','col5') 
// OK 
select * from test 
// Error: General error;-2010 POS(1) Assignment impossible, char value
too long 

=> Actually selecting any column after ther SERIAL column gives an
error: 
    (eg. select col4 from test or select col1,col5 from test all produce
the same error). 
=> Providing all columns in the insert does not help 
    (eg. insert into test (col1,col2,col3,col4,col5)
values('col1','col2',0,'col4','col5') 

=> Just selecting columns up to the SERIAL column is fine: 
     (eg. select col1,col2,col3 from test) 

If the same table is created such that the serial column comes last 
everything is fine (no matter what you select): 

CREATE TABLE test( 
col1               Char (4) ASCII    NOT NULL, 
col2               Char (4) ASCII, 
col4               Char (4) ASCII, 
col5               Char (4) ASCII, 
col3               Fixed (6,0)    DEFAULT SERIAL (1), 
PRIMARY KEY (col1)) 
insert into test (col1,col2,col4,col5)
values('col1','col2','col4','col5') 
select * from test 

// ok 

 

Reply via email to