I regularly use the Sybase Central Database Migration Tool to move tables between SQL Anywhere databases. I recently investigated a missing data case and found that selects from proxy tables can return a zero length string in certain situations. My current workaround is to use the INPUT USING command to migrate data as this avoids the data loss.
To Recreate I did the following.
I created a table with 5 columns each defined as nvarchar(1024). I then inserted 4 rows filled to the lengths below.
COL1 COL2 COL3 COL4 COL5
1024 1023 1023 1024 1023
1024 1023 1024 1024 1023
1024 102 102 1024 1023
1024 102 102 102 1023
When I ran a "select *" from this table the following columns were blank - row 1 column 4 , row 2 columns 3 and 4, row 3 column 4 (all should be in bold).
I'm using SQL Anywhere 12 version 126.96.36.19955 on Windows 7 (this issue occurs on other windows versions). Both databases use UCA collation and UTF8 charset. The ODBC Driver is also version 188.8.131.5255.
asked 08 Jul '15, 05:27
Your problem ended up being a bug in the way nvarchar columns were being handled in SQLA's CIS/OMNI layer. The bug has been fixed in v12 build 4294 and v16 build 2156.
answered 13 Jul '15, 16:18