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

asked 18 Jul '13, 09:21

Sam1216's gravatar image

Sam1216
16112
accept rate: 0%

edited 18 Jul '13, 09:33

Mark%20Culp's gravatar image

Mark Culp
24.9k10139297

1

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?

(18 Jul '13, 09:35) Mark Culp

Try this: CONVERSION_MODE option

...I confess, I didn't read very far, my head exploded :)

permanent link

answered 18 Jul '13, 14:33

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 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:

×94
×17

question asked: 18 Jul '13, 09:21

question was seen: 4,834 times

last updated: 18 Jul '13, 14:33