SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Oracle Update Statement Fails

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Oracle Update Statement Fails
Author Message
Jeff



Joined: 29 Apr 2002
Posts: 37

Post Oracle Update Statement Fails Reply with quote

I have a job that attempts to update the status of an Oracle table if it meets certain criteria (see code below). When I run this job I get an ORA-00900 error Invalid SQL statement. However, if I step through and debug the job and copy the sql that is created to TOAD and run it, it seems to work fine. Any ideas?
Thanks,
Jeff

ConcatEx "Update essbase_calc_audit Set status = 'HUNG', end_datetime = sysdate ", &

"Where sequence_key IN ", &

"(Select sequence_key From essbase_calc_audit Where status = 'RUNNING' ", &

"and (sysdate - start_datetime)*24*60 > 60)", &

sql

DatabaseExecute( "sql", sts )

Note, I am doing some other things as well is why I wrote this as a JAL script instead of just plain sql statement.

Wed Nov 01, 2006 7:03 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7970

Post Re: Oracle Update Statement Fails Reply with quote

It should be DatabaseExecute( sql, sts )

"sql" in this context is a variable name not a string constant.

: I have a job that attempts to update the status of an Oracle table if it
: meets certain criteria (see code below). When I run this job I get an
: ORA-00900 error Invalid SQL statement. However, if I step through and
: debug the job and copy the sql that is created to TOAD and run it, it
: seems to work fine. Any ideas?
: Thanks,
: Jeff

: ConcatEx "Update essbase_calc_audit Set status = 'HUNG', end_datetime =
: sysdate ", &

: "Where sequence_key IN ", &

: "(Select sequence_key From essbase_calc_audit Where status = 'RUNNING'
: ", &

: "and (sysdate - start_datetime)*24*60 > 60)", &

: sql

: DatabaseExecute( "sql", sts )

: Note, I am doing some other things as well is why I wrote this as a JAL
: script instead of just plain sql statement.

Wed Nov 01, 2006 7:19 pm View user's profile Send private message
Jeff



Joined: 29 Apr 2002
Posts: 37

Post Re: Oracle Update Statement Fails Reply with quote

Thanks!

: It should be DatabaseExecute( sql, sts )

: "sql" in this context is a variable name not a string constant.

Thu Nov 02, 2006 11:28 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.