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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple query result

Status
Not open for further replies.

parsql

MIS
Nov 10, 2005
106
US
declare @cmd as varchar(4000)
set @cmd =
'
select count(ID)FA00100_count from test1
go
select count(ID) IV40400_Count from test3
go
select count(ID)POP10100_count from test4
'
exec master.dbo.spSQLSMTPMail @vcTo = 'test@test.net', @vcSubject = 'Record Count',@vcQuery = @cmd

when i try to do this it gives me error saying that

Server: Msg 105, Level 15, State 1, Line 3
Unclosed quotation mark before the character string ''select count

how can i solve this
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top