Page 1 of 1

Result Columns in a Stored Procedure

Posted: Fri May 07, 2004 4:07 am
by MukundShastri
How many number of result columns are to be mentioned in an odbc stage while calling a stored procedure ? can anybody throw light on this.

BackGround:
I am trying to call a simple stored procedure from an odbc stage.
My job looks like this:
odbcstage --> Tranformer ---> sequential file.

I am passing an input parameter in odbc stage as my procedure requires.
I am putting one dummy column char(4) in the odbc stage to receive result set of procedure. Also I am passing a dummy value to output sequential file. Basically my aim here is to run stored procedure from datastage.
With above set up - I am getting following error while running the job:
OdbcTest..Transformer_5: |SQL statement has incorrect number of result columns.|

Can anybody throw light upon this ....!!

Thanks

Mukund Shastri

Posted: Fri May 07, 2004 6:02 am
by ray.wurlod
The same number of columns as are defined on the Columns grid on that link of the ODBC stage. When you import the Stored Procedure definition it is filed within the Table Definitions branch of the Repository, so you can see how many columns it expects to be in the Columns grid.

Posted: Fri May 07, 2004 7:24 am
by MukundShastri
When I import stored procedure metadata using import--table definations--stored procedure option from Manager, the columns are left blank in the metadata; only input parameter name comes in the parameter tab.

Posted: Fri May 07, 2004 9:13 pm
by ray.wurlod
One input parameter means you must deliver one column from the input link.

Posted: Wed Jun 14, 2006 10:09 am
by jman
ray.wurlod wrote:One input parameter means you must deliver one column from the input link. ...
When I import stored procedure metadata using import--table definations--stored procedure option from Manager, the columns are left blank in the metadata; and in the parameter tab I have the following:

ReturnValue | Integer | RETURN | ...
@base | Char | IN | ...

What i must to put in the column definition?

Thanks in advance !