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
-
shukla_krishna
- Premium Member
![Premium Member Premium Member](./images/ranks/premium.gif)
- Posts: 28
- Joined: Mon Apr 20, 2009 11:27 pm
- Location: san antonio
Post
by shukla_krishna »
I have query in oracle enterprise stage like
UPDATE <Table NAME> SET < Column name> = :2, WHERE <column name > = < Value>
:2 is out put of transformer stage which is out put of routine and routine return the jobs fatal errors for given any other job.
Getting error
ORA-01036: illegal variable name/number
I tried hard coding of :2 then also getting same eror.
Krishna Shukla
-
ray.wurlod
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
-
Contact:
Post
by ray.wurlod »
What ever happened to :1 ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
Sainath.Srinivasan
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Post
by Sainath.Srinivasan »
I think you can skip :1 if you are not using it.
But why do you have a comma before WHERE ?
-
chulett
- Charter Member
![Charter Member Charter Member](./images/ranks/charter_member%s.gif)
- Posts: 43085
- Joined: Tue Nov 12, 2002 4:34 pm
- Location: Denver, CO
Post
by chulett »
Sainath.Srinivasan wrote:I think you can skip :1 if you are not using it.
No, you
cannot, which is why Ray asked about it and why the error is being generated.
All columns must be bound into the DML.
-craig
"You can never have too many knives" -- Logan Nine Fingers
-
Sainath.Srinivasan
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Post
by Sainath.Srinivasan »
Craig,
You are right.
Tried a test job and gives me the exact error message.
But wonder what I did in Server jobs to avoid using all columns. Must try to remember.
-
chulett
- Charter Member
![Charter Member Charter Member](./images/ranks/charter_member%s.gif)
- Posts: 43085
- Joined: Tue Nov 12, 2002 4:34 pm
- Location: Denver, CO
Post
by chulett »
The ODBC stage is the only stage that allows that, AFAIK.
-craig
"You can never have too many knives" -- Logan Nine Fingers
-
shukla_krishna
- Premium Member
![Premium Member Premium Member](./images/ranks/premium.gif)
- Posts: 28
- Joined: Mon Apr 20, 2009 11:27 pm
- Location: san antonio
Post
by shukla_krishna »
chulett wrote:The ODBC stage is the only stage that allows that, AFAIK. ...
but this is strange, because there is no need to update :1 and you are forced to do that
Krishna Shukla
-
chulett
- Charter Member
![Charter Member Charter Member](./images/ranks/charter_member%s.gif)
- Posts: 43085
- Joined: Tue Nov 12, 2002 4:34 pm
- Location: Denver, CO
Post
by chulett »
You're not forced to update it but you do need to
use it, typically in the 'wher'e clause if nothing else.
![Idea :idea:](./images/smilies/icon_idea.gif)
If you don't need a column in the DML,
don't send it to the stage.
-craig
"You can never have too many knives" -- Logan Nine Fingers