We doing an audit trail and for each field I need to call a Stored procedure (SP2) which insert a record to the audit table. I want to do a sort of perform in my current Stored Procedure (SP1) but is not sure how..
Set field1 to abc...
Set field2 to abc...
Set field1 to cde...
Set field2 to cde...
I need to call SP2 multiple times and was wondering if I could create a LOOP or something that will iterate the same call... Is it possible? where do I find information on that...
Thanks in Advance
Joined: 20 Oct 2006 Posts: 6970 Location: porcelain throne
why he was so unhelpful and rude.
is just another way of crying like a little baby, because I did not give you code to accomplish your task.
Since you did not bother to explain
from which programming language you were invoking the SP,
how do you expect anyone to provide you code
or actually do your work for you.
besides, it is sort of a non-question.
what do you mean invoke multiple times.
you want to loop the following:
the population of the parms is the key to the loop.
you explained nothing about the source of the data/values for the parms.
your problem lies more in the area not being able to explain your requirement,
and less about a members 'social graces'.
Thanks Enrico I will bookmark and next time refer to it to make sure I ask the question correct. I still feel it was not necessary for the Eric to be rude about it... Surely one do not ask a question before checking in manuals and with collegues... next time I will follow your advise on how to ask...
Thank you I see where you come from. I do not post a lot as most of the time I find what I need in previous posts, so that should indicate to me that the vast majority just ask before check for themselves. I have learned a lot about syncsort by just reading previous post without any before hand knowledge, so your statement is true.
Hi Mallik; that you very much I it was exactly what I used. We converting some COBOL programs to SQL SP's and I just did not know how on earth to do the perform. The SQL WHILE statement is actually convertion for a COBOL PERFORM UNTIL statement but I got it work for the normally COBOL PERFORM statement with a bit of IF logic inside the DO WHILE loop... I tried the "LOOP" statement but not sure I quite understand it because I needed to perform my routine for different senarios at different times, it was quite fun testing it but it work and is implemented already.