Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help. Newbie

Status
Not open for further replies.

nick122211

Technical User
Nov 13, 2006
8
US
Ok this is what I am trying to do. I need to select all rows from one table and feed them into a execute statement and have that statement run for each row of the other table.

Not sure where to start?


declare @ServerName VarChar(100)
begin
select @serverName = (Select server from SMTPAlert.dbo.servers)

exec SMTPAlert..sp_send_cdosysmail @serverName

end

Any help would be much appreciated

 
i'm going to guess that you should be posting this question in the microsoft sql server forum, forum183

this forum is for ANSI SQL

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top