User defined sql in DB2 API Stage

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
peeyushanand
Participant
Posts: 7
Joined: Tue Jun 13, 2006 4:15 am

User defined sql in DB2 API Stage

Post by peeyushanand »

Hi,

I am using the DB2 API stage for writing a user - defined SQL that will insert some values into the table using a left outer join between two tables. But when I am doing so, I am getting an error :-

"This SQL statement did not contain the same number of parameters as columns on this link. This usually happens with user-defined SQL."

Since the API stage cannot run on its own, so I am using a row generator and connecting it to the API stage.

The DB2 Database is a remote v 8.2 database.

Please help.

Thanks in Advance

Peeyush Anand
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not really enough information. However, the problem is that one of your SQL statements in your job contains a number of parameter markers that is different from the number of columns defined on that link. You must find out where that is, and fix it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How many parameter markers are in your SQL? You'll need the same number of columns defined in the DB2 stagte as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
thurmy34
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 31, 2006 8:27 am
Location: Paris

Post by thurmy34 »

Hi
This message appears when you add a column whithout specify its type and its legnth.
Happens to me yesterday.
Hope This Helps
Regards
Harichandrar
Participant
Posts: 2
Joined: Thu Jan 31, 2008 1:19 pm

Re: User defined sql in DB2 API Stage

Post by Harichandrar »

Please let me know if you solved this issue. I have got the similar issue and still didn't get any clue.
Thank you,
Hari.
Post Reply