Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
allanurban
Starting Member
21 Posts |
Posted - 2012-08-24 : 06:16:35
|
HelloI have a store procedure (GetLimits) with a single input variable (stat varchar). It returns a resultset with a single row and three columns (col1 int, col2 float, col3 bit).col1 and col2 holds some limits that I need in calculating my output in a second stored procedure called GetOutput with the same input variable as GetLimits.I can execute the first one with: EXEC GetLimits 'Stat1' But how can I then use the resultset I get? Can I save the resultset into variables and then work with them?I'd really appriciate a small nod in the right direction. |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-08-24 : 06:43:52
|
| declare a table variable (or temp table) with the correct format theninsert @tblexec GetLimits 'Stat1'==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
allanurban
Starting Member
21 Posts |
Posted - 2012-08-24 : 07:34:43
|
| Exactly what I needed. Thanks. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|