Unable to execute Before SQL statement
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 25
- Joined: Wed May 02, 2007 1:07 am
Unable to execute Before SQL statement
Hi,
I tried to execute a Before SQL statement in one of my DS Job (v8.5). during execution it is throwing the error.
"OC_TD_MeterGroup_STG: The OCI function executeDirect returned status -1. Error code: 24,374, Error message: ORA-24374: define not done before fetch or execute and fetch. (CC_OraUtils::handleBeforeAfterSQL, file CC_OraUtils.cpp, line 4,633)"
I tried to search the forum, but no joy.
Can you please help me with this.
Thank You!
I tried to execute a Before SQL statement in one of my DS Job (v8.5). during execution it is throwing the error.
"OC_TD_MeterGroup_STG: The OCI function executeDirect returned status -1. Error code: 24,374, Error message: ORA-24374: define not done before fetch or execute and fetch. (CC_OraUtils::handleBeforeAfterSQL, file CC_OraUtils.cpp, line 4,633)"
I tried to search the forum, but no joy.
Can you please help me with this.
Thank You!
Re: Unable to execute Before SQL statement
Because it s an oracle error might be the reason. Are you trying to execute procedure / sql query?
DS User
DS User
-
- Participant
- Posts: 25
- Joined: Wed May 02, 2007 1:07 am
You can't do things like "SELECT" before sql, where would the results go? You need to do "before things" like alter the session or truncate a table, to name a couple of options off the top of my head.
Forget the before SQL error and tell us what you are trying to accomplish instead, why you need this batch number, how it will be used in / by the job.
Forget the before SQL error and tell us what you are trying to accomplish instead, why you need this batch number, how it will be used in / by the job.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 25
- Joined: Wed May 02, 2007 1:07 am
Thank you, Craig.
I'm trying to extract the max(Batch_Number) from a table. So, that I can use this value and increment by 1 every time i run the job.
I tried using a routine (using basic transformer) that did not work.
used, jobruntime as well...no Joy.
Can you please share any thoughts on this.
Thanks.
I'm trying to extract the max(Batch_Number) from a table. So, that I can use this value and increment by 1 every time i run the job.
I tried using a routine (using basic transformer) that did not work.
used, jobruntime as well...no Joy.
Can you please share any thoughts on this.
Thanks.
-
- Participant
- Posts: 80
- Joined: Fri Aug 21, 2009 7:49 am
- Location: India
Unable to execute Before SQL statement
Can you please specify the exact meaning of
What actually did not work?
This can be done using before job sub routine. You can fetch the value and pass it as a paramter to the job.
Code: Select all
I tried using a routine (using basic transformer) that did not work.
used, jobruntime as well...no Joy.
This can be done using before job sub routine. You can fetch the value and pass it as a paramter to the job.
Re: Unable to execute Before SQL statement
No, it can't.austin_316 wrote:This can be done using before job sub routine. You can fetch the value and pass it as a paramter to the job.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 25
- Joined: Wed May 02, 2007 1:07 am