Sybase Sql error

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Sybase Sql error

Post 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.
Thanx&Regards
scorpion
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Hi All,
Can any one help me on this..
Thanx&Regards
scorpion
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Are you using single or double quotes around your date value?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Hi,

I am using Double quotes
Thanx&Regards
scorpion
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
turash
Premium Member
Premium Member
Posts: 51
Joined: Fri Apr 06, 2007 10:09 am
Location: Edison, NJ

Re: Sybase Sql error

Post 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.
Post Reply