Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Passing Data to Stored Procedures

Ok, new to DB programming here...
MS SQL 2000
But I have a Stored Procedure....it works if I hard code the data.

What I want to do is this though.
I have 2 tables
1 table has just one piece of data in it....Table1
the other table has user info....Table2

I want to pull the users email address from Table2 and merge it with the Body of the email message in Table1

How do I go about doing this?
I thought maybe you could do a Select statement and passed the returned data to the SP, like in calling functions, but it appears you can't.

So how do I set the variables in the SP with the data from my DB Tables?

Thanks for any help.
[701 byte] By [sdunn96] at [2007-11-11 10:23:04]