The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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
22.3k9129262

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
26.6k418575824
accept rate: 21%

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:

×79
×14

question asked: 18 Jul '13, 09:21

question was seen: 1,692 times

last updated: 18 Jul '13, 14:33