Back to SPR List Previous Next
Very old SQL problem can effect ODBC access to SIR I*1 variables with large valid values.
Moderate Closed - Fixed Found:sir2.3 30 APR 2004 Fixed:2002.20.36 06 MAY 2004

DETAILS
 Some valid data values can be converted to missing when transferring data
 from sir using ODBC. Values effected are likely to be integer*1 variables
 with many valid values and/or relatively large valid values. These larger
 valid values are the ones likely to be effected.

 This problem stems from the way missing/valid ranges are stored in tabfile
 table columns.

 ODBC uses SQL to retrieve data from a database;
 SQL Select copies selected rows and columns to a TABFILE TABLE;
 Table columns store missing/valid range pointer indicators as high values.

 The example program shows that in SQL, 123 becomes an invalid value when it
 is one of four or more valid values. This can be reproduced on sir2.3 (and
 possibly earlier).

 A Database example might be a record with 80 valid values including
 97,98,99. These high values would be transferred as missing.

 (This would also effect I*2 with valid values like 32761 etc)
EXAMPLE PROGRAM
 CREATE TABFILE SQLVAL
 CREATE TABLE REC_1 (DATA1 TINYINT VALID VALUES (1,2,123) DATA2 TINYINT VALID VALUES (1,2,3,123))
 INSERT INTO REC_1 VALUES (1,1)
 INSERT INTO REC_1 VALUES (123,123)
 SELECT * FROM REC_1

   DATA1     DATA2
   --------  --------
          1         1
        123  ********
WORKAROUND
Redefine these integers as I*2 or transfer these data by some other means (eg CSV SAVE FILE).
Back to SPR List Previous Next