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 |
|
hanavan
Starting Member
25 Posts |
Posted - 2008-09-15 : 17:01:36
|
| I have a stored procedure with 3 variables:@customerid@from@toI can run this by doing:exec SP @customerid ='|customer|,130',@from = 'info@test.com',@to = 'test@tes.com';This is working great, but I want to use data from a table (dbo.Parameter01) in which I have customerid, from and to.Table structure:customerid - from - to130 - info@test.com - test@test.com350 - A1@a2.com - test@test.comWhat I want is to use the output of the table, in the exec statement. But I can't see how I can do it. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-15 : 23:58:18
|
| and you would obviously have to loop if you want procedure to be executed for each row values of table. |
 |
|
|
hanavan
Starting Member
25 Posts |
Posted - 2008-09-16 : 16:43:03
|
| Thank you,It worked. |
 |
|
|
|
|
|