Page 1 of 1

User defined sql in DB2 API Stage

Posted: Wed Mar 12, 2008 1:34 am
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

Posted: Wed Mar 12, 2008 1:50 am
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.

Posted: Wed Mar 12, 2008 7:08 am
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.

Posted: Tue Mar 18, 2008 4:36 am
by thurmy34
Hi
This message appears when you add a column whithout specify its type and its legnth.
Happens to me yesterday.

Re: User defined sql in DB2 API Stage

Posted: Mon Oct 27, 2008 12:12 pm
by Harichandrar
Please let me know if you solved this issue. I have got the similar issue and still didn't get any clue.