Oracle error

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
Mark j
Participant
Posts: 20
Joined: Tue Apr 20, 2004 9:26 am

Oracle error

Post by Mark j »

I am getting following error and the job is getting aborted

:Error while trying to retrieve text for error ORA-01036


can any one find a solution to this error
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If all else fails, look it up yourself! :wink:

Code: Select all

$ oerr ORA 1036
01036, 00000, "illegal variable name/number"
// *Cause: Unable to find bind context on user side
// *Action: Make sure that the variable being bound is in the sql statement.
$ 
Custom SQL?
-craig

"You can never have too many knives" -- Logan Nine Fingers
nag0143
Premium Member
Premium Member
Posts: 159
Joined: Fri Nov 14, 2003 1:05 am

Post by nag0143 »

i hope you have to look into your custom SQL
Mark j
Participant
Posts: 20
Joined: Tue Apr 20, 2004 9:26 am

Post by Mark j »

for driver table

Code: Select all

SELECT a.PROG_ID,a.AGRMT_PRD_ID,a.PROG_OPT_ID,a.PROG_OPT_DESC  FROM sds.t_prog_opt a
where a.agrmt_prd_id=(select max(b.agrmt_prd_id)  
from  sds.t_prog_opt b where  a.prog_id=b.prog_id )
for lookup table

Code: Select all

select  distinct a.prog_id, a.agrmt_prd_id from sds.t_enty_xpns_desc a
where a.agrmt_prd_id=(select max(b.agrmt_prd_id) 
from sds.t_enty_xpns_desc b 
where a.prog_id=b.prog_id)
while i view the data after sql i view it perfectly and all i am doing is joining these tables on progid and mapping the other fields... but where am i going wrong.

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

Post by chulett »

Make sure you've got columns defined for all of the fields being returned by these queries...

How are you 'joining' the two results? There doesn't seem to be a 'key' field in your lookup. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mark j
Participant
Posts: 20
Joined: Tue Apr 20, 2004 9:26 am

Post by Mark j »

Craig,
chulett wrote:Make sure you've got columns defined for all of the fields being returned by these queries...

How are you 'joining' the two results? There doesn't seem to be a 'key' field in your lookup. :?
I have all the columns defined for all the fields being returned by queries
and prog_id and agmt_prg_id are keys

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

Post by chulett »

Mark j wrote:I have all the columns defined for all the fields being returned by queries and prog_id and agmt_prg_id are keys
Then that's the problem - the 'are keys' bit.

It didn't find anywhere to 'bind' the key column(s) in your custom sql. Assuming both are keys and they are column 1 and column 2 respectively, you need to reference both bind variables or Oracle won't be happy... meaning somewhere in your 'where' clause you need something like:

Code: Select all

and prog_id = :1 and agmt_prog_id = :2
so it knows how to constrain the lookup properly based on the current input link row.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply