ORA-00900: invalid SQL statement

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

ORA-00900: invalid SQL statement

Post by sri75 »

Hi,

I am updating records in DRS Stage with the following update statment.(generated statment)

UPDATE tablename
SET EFF_STATUS=?,
DESCR=?,
DESCRSHORT=?,
GVT_VET_RECR_CODE=?,
GVT_VET_RECR_PTS=?,
HRS_ROW_ADD_DTTM=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'),
HRS_ROW_ADD_OPRID=?,
HRS_ROW_UPD_DTTM=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'),
HRS_ROW_UPD_OPRID=?,
LOAD_ERROR=?,
DATA_ORIGIN=?,
CREATED_EW_DTTM=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'),
LASTUPD_EW_DTTM=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'),
BATCH_SID=?
WHERE GVT_VET_PREF_APPT=? AND EFFDT=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') AND SRC_SYS_ID=?;

After updating records it is throwing this warning message
ORA-00900: invalid SQL statement

I am not able to pin point the problem in the sql statment.Can you please help me out

Thanks
Sri
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

So the job runs and records are updated in the database but then it throws a warning at the end?

Have you tried running it with just one record which you know performs an update? Does the warning still occur? It may be data related, otherwise not sure why it would work for some records and then throw warning.
Regards,

Nick.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You might want to check your After SQL tab and make sure nothing is there. I've seen goofy things like that when a space ends up getting put in it by accident.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Re: ORA-00900: invalid SQL statement

Post by DeepakCorning »

Also check if there is an output link from this stage to any other stage such as a Hashed File and if the select statement in that one is ok...
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

From Oracle Error message list i got this, I don't know but it might help you.

Code: Select all

ORA-00900 invalid SQL statement

Cause: The statement is not recognized as a valid SQL statement. This error can occur if the Procedural Option is not installed and a SQL statement is issued that requires this option (for example, a CREATE PROCEDURE statement). You can determine if the Procedural Option is installed by starting SQL*Plus. If the PL/SQL banner is not displayed, then the option is not installed.

Action: Correct the syntax or install the Procedural Option.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

Yes Craig,

there was a space in sql after tab.After removing it ,it went fine.Thanks

Thanks for all of your suggestions
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:D Please mark as Resolved!
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Now thats what you call, experience :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Experience is what you get when what you expected to happen doesn't.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

O yea, left out the `ed from experienced. O well, potayto potaato.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply