I executed the below mention query , select * from ABCD where DATETIME_ID >= '2013-07-16 20:30' and DATETIME_ID < '2013-07-16 21:00' and AAT = '2' and EVENT_NUMBER = '2' and VENDOR = 'Airtel' and HIERARCHY_3 = 'TE0040962' and HIERARCHY_1 = 'TE0040962-C' and CAUSE_CODE = '12' and SUBCAUSE_CODE = '107' it is throwing a error as " "[Error Code: 21, SQL State: QFA13] SQL Anywhere Error -1001013: Invalid data type comparison in predicate (rawview.CAUSE_CODE = '12')"" the data type of "CAUSE_CODE" and "SUBCAUSE_CODE" are "smallint" can anyone have any idea why the above error is coming ? Thanks in advance. Sam |
Try this: CONVERSION_MODE option ...I confess, I didn't read very far, my head exploded :) answered 18 Jul '13, 14:33 Breck Carter |
The error code -1001013 does not look like a valid SQL Anywhere error. What API are you using? What version (and build) of SQL Anywhere are you using?
If CAUSE_CODE and SUBCAUSE_CODE are smallint then why are you quoting the '12' and '107'? It would seem to make more sense to just use the numeric int values 12 and 107.
Ok, to answer my own question above - error -1001013 seems to be an IQ error code. Are you using Sybase IQ?