Page 1 of 1

Running Stored Procedure SQL 2005 in DataStage

Posted: Mon Jan 31, 2011 1:08 am
by ylai20
Hi all, i have create a simple stored procedure and want to run from DataStage. Can i just use one Stored Procedure stage to do it?

I have try to use this method but it required input and output which i think is not necessary.

Is there any better way i just have something like a StoredProcedure that just link to the SP in SQL server 2005?

Posted: Mon Jan 31, 2011 3:35 am
by Sreenivasulu
You can use a 'dummy input' using rowgenerator and a 'dummy ouput' (dummy output if you do not need error handling)

Regards
Sreeni

Re: Running Stored Procedure SQL 2005 in DataStage

Posted: Mon Jan 31, 2011 8:17 am
by chulett
ylai20 wrote:I have try to use this method but it required input and output which i think is not necessary.
It's necessary. And since we're talking Server job, that dummy input would need to come from a Transformer. Make sure you define a stage variable in it and use a constraint of @OUTROWNUM=1.

Posted: Mon Jan 31, 2011 3:50 pm
by ray.wurlod
Doesn't have to come from a Transformer at all. You can select one row from any reliable source (for example the "VOC" entry from "VOC").

Posted: Mon Jan 31, 2011 6:46 pm
by chulett
... or you can use a Transformer. 100% reliable. :wink:

Change "would need to" to "could" in my previous post.