I have tried to execute one procedure in stage ODBC: User-defined
SQL=call nameprocedure(); The procedure is executed several times
(loop). How I can avoid the loop?
Thanks
Store procedure in DataStage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 5
- Joined: Thu Jan 27, 2005 8:34 am
Hi,
please post the structure of the job.
I used a stored procedure via ODBC but it never run more then once.
so I wonder how come your's does?
does the SP have a recursive call?, or does it simply contains a bad join which results in a cartezian result set (5 rows from table a with no join on table b having also 5 rows will return 5*5 = 25 rows)???
IHTH,
please post the structure of the job.
I used a stored procedure via ODBC but it never run more then once.
so I wonder how come your's does?
does the SP have a recursive call?, or does it simply contains a bad join which results in a cartezian result set (5 rows from table a with no join on table b having also 5 rows will return 5*5 = 25 rows)???
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Hello peppinodicapri,
I have also come across a situation where I ran a DataStage job one time that called a stored procedure one time via an ODBC connection, and the DataStage job logs show one execution, but tracing on the SQL server shows the stored procedure executed multiple times. And the same thing happens with other stored procedures. I even ran one of the stored procedure from Query Analyzer and the stored procedure executed multiple times.
That seems to suggest there is something interesting about the stored procedures, not DataStage.
Did you ever find out why yours did that?
Thanks,
Lynda
I have also come across a situation where I ran a DataStage job one time that called a stored procedure one time via an ODBC connection, and the DataStage job logs show one execution, but tracing on the SQL server shows the stored procedure executed multiple times. And the same thing happens with other stored procedures. I even ran one of the stored procedure from Query Analyzer and the stored procedure executed multiple times.
That seems to suggest there is something interesting about the stored procedures, not DataStage.
Did you ever find out why yours did that?
Thanks,
Lynda
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Store procedure in DataStage
The stored procedure is called once for each row processed by the job.peppinodicapri wrote:I have tried to execute one procedure in stage ODBC: User-defined
SQL=call nameprocedure(); The procedure is executed several times
(loop). How I can avoid the loop?
Thanks
The only way you can "avoid the loop" is by processing only one row.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.