jtseltmann
Programmer
I have one main stored proc that sets a table variable and then loops through the records. After setting the vars I call my other proc that has an output param I need.
As I perform the loop...the input to the 2nd proc changes and I expect the output param to change was well. I can verify this also by printing my vars. It seems the call to the proc to get the output is happening once. One of the records in my set should return an error text and it isn't. If I make my loop select only pull that one record then it works but if it pulls all 150 it doesn't.
I have tried everything from calling the proc and hard coding the values. When I do this by itself, it works and the error text is returned. When I add it back and call the proc as I loop through records it never finds the bad rec.
I'm relatively new to sql proc programming but I cannot figure this one out. I can post sample code if you like. My code works perfectly except for the one var I set using the output from this second proc.
Is there some problem calling a proc within proc? NO right?
ANy help or suggestions would be great! Thanks!
As I perform the loop...the input to the 2nd proc changes and I expect the output param to change was well. I can verify this also by printing my vars. It seems the call to the proc to get the output is happening once. One of the records in my set should return an error text and it isn't. If I make my loop select only pull that one record then it works but if it pulls all 150 it doesn't.
I have tried everything from calling the proc and hard coding the values. When I do this by itself, it works and the error text is returned. When I add it back and call the proc as I loop through records it never finds the bad rec.
I'm relatively new to sql proc programming but I cannot figure this one out. I can post sample code if you like. My code works perfectly except for the one var I set using the output from this second proc.
Is there some problem calling a proc within proc? NO right?
ANy help or suggestions would be great! Thanks!