Page 1 of 1

Sybase Sql error

Posted: Fri Aug 10, 2007 10:22 am
by scorpion
Hi All,

I am using one sybase database table 'XXX'as my source ,and it contains one column like 'enddate'.

and the values are like for this column in database are :

31 Dec 3999

21Aug3999 etc..

In my source sybase stage ,when i tried to add user defined qry like

select enddate from XXX where enddate = "3999-12-31"


I am getting job aborting,and below messages are getting in my director log.

Warning:

SB_XXX,0: Warning: Job1.XXX: Sybase Server warning 102 (severity 15): Incorrect syntax near '3999'.

Fatal:

XXX,0: Failure during execution of operator logic.

XXX,0: Fatal Error: Fatal: Attempt to get target table info from sp_tables failed.
SQL statement: sp_tables ""3999-12-31""\n



Can any one help me to resolve this.

Posted: Fri Aug 10, 2007 11:27 am
by scorpion
Hi All,
Can any one help me on this..

Posted: Fri Aug 10, 2007 11:49 am
by kcbland
Are you using single or double quotes around your date value?

Posted: Fri Aug 10, 2007 11:57 am
by scorpion
Hi,

I am using Double quotes

Posted: Fri Aug 10, 2007 12:44 pm
by kcbland
And you're sure double quotes are valid syntax? In my experience double quotes are used as column labels, sometimes with the AS keyword. Try single quotes.

Posted: Fri Aug 10, 2007 12:57 pm
by chulett
I'm thinking there was a pretty strong implication there that whatever flavor of quotes you were using were wrong, so try the other. :wink:

Re: Sybase Sql error

Posted: Fri Aug 10, 2007 2:35 pm
by turash
AS much i know about Sybase ase maximum date it allow is 6/6/2079
and if you fire your query mentioned in thread in isql it will give you arithmetic overflow.

scorpion wrote:Hi All,

I am using one sybase database table 'XXX'as my source ,and it contains one column like 'enddate'.

and the values are like for this column in database are :

31 Dec 3999

21Aug3999 etc..

In my source sybase stage ,when i tried to add user defined qry like

select enddate from XXX where enddate = "3999-12-31"


I am getting job aborting,and below messages are getting in my director log.

Warning:

SB_XXX,0: Warning: Job1.XXX: Sybase Server warning 102 (severity 15): Incorrect syntax near '3999'.

Fatal:

XXX,0: Failure during execution of operator logic.

XXX,0: Fatal Error: Fatal: Attempt to get target table info from sp_tables failed.
SQL statement: sp_tables ""3999-12-31""\n



Can any one help me to resolve this.