Regarding SQL Query in DB2 Stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
purush
Participant
Posts: 16
Joined: Sat Nov 25, 2006 5:34 am
Location: Hyderabad

Regarding SQL Query in DB2 Stage

Post by purush »

Hi,

I was using COLUMN_NAME=? in the sqlquery inthe ODBC stage to make a LookUp. Now the requirement is to use an DB2 stage,if I'm using the same query it is throwing an warning saying incorrect number of parameters.

[IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001

Can anybody help me.

Purush
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You need to bind the lookup variable in the reference database. Check the number of key column math the lookup keys.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The ODBC stage is very forgiving of binding issues. Others are very picky. For a lookup, you'll need as many ? bind parameters as you have Key fields defined.
-craig

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