Hi Experts.. Requirement: --If the following query resulted greater than zero rows, send email in a tabular format using SQL Server database mail --if is is equal to zero ,don't send the mail. can someone help me in this SELECT [DateTime] ,[Text] FROM [MicrosoftLog].[dbo].[Log] where [LogApplicationID] in (select [LogApplicationID] from [MicrosoftLog].[dbo].[LogApplication] where applicationname in ( 'VirtualMan', 'PhysicalMan')) and StartText<> 'count=0' and StartDateTime < GetDate() and StartDateTime > dateadd(minute, -30, GetDate()) Any input is appreciated |
↧
Send email in a tabular format using SQL Server database mail conditionally depending upon result row count
↧