I'm having trouble getting the steps down on how to set up my recursive stored procedure...here's my problem.
I have a list of items with about 6 pieces of data per record...IF...one of the records has a 'RaisedEvent' field that contains a value (not null), then call the another (or the same) stored procedure to get the values for that.
Here's my issue...there will be two different types of input parameters for this issue. The one that calls the first SP is with a date range, if that 'RaisedEvent' value is found in any record, then it needs to call another stored procedure using paramters of just the event's number.
Can I use to separate SP's for this problem and just have each of them write to a temp table? How can I do the check for that specific value in the middle of the first SP.
Thanks everyone...(This is my first try with Recursion in SQL)
I have a list of items with about 6 pieces of data per record...IF...one of the records has a 'RaisedEvent' field that contains a value (not null), then call the another (or the same) stored procedure to get the values for that.
Here's my issue...there will be two different types of input parameters for this issue. The one that calls the first SP is with a date range, if that 'RaisedEvent' value is found in any record, then it needs to call another stored procedure using paramters of just the event's number.
Can I use to separate SP's for this problem and just have each of them write to a temp table? How can I do the check for that specific value in the middle of the first SP.
Thanks everyone...(This is my first try with Recursion in SQL)