I have one table called Product.
The product table have more records, Some time the table not have record.
So i want to check the product table,
<
You can apply different approach.. Just execute a SQL Database task from SSIS to execute SP "only if you specifically want SSIS step to be executed" (or you can just create SPand schedule it in job scheduler that it). and inside the SP you can send email. in case ,if you dont know how to setup email profile refer this (https://www.codeproject.com/Articles/485124/Configuring-Database-Mail-in-SQL-Server)
example as below -
CREATE TABLE #Temp
(
[Rank] [int],
[Player Name] [varchar](128),
[Ranking Points] [int],
[Country] [varchar](128)
)
INSERT INTO #Temp
SELECT 1,'Manoj Kargeti',12390,'India'
UNION ALL
SELECT 2,'Vimal Kumar',7965,'Nepal'
UNION ALL
SELECT 3,'Pappu Djokovic',7880,'ShriLanka'
DECLARE @xml NVARCHAR(MAX)
DECLARE @body NVARCHAR(MAX)
SET @xml = CAST(( SELECT [Rank] AS 'td','',[Player Name] AS 'td','',
[Ranking Points] AS 'td','', Country AS 'td'
FROM #Temp ORDER BY Rank
FOR XML PATH('tr'), ELEMENTS ) AS NVARCHAR(MAX))
SET @body ='Tennis Rankings Info
Rank Player Name Ranking Points Country '
SET @body = @body + @xml +'
'
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'SQL ALERTING', -- replace with your SQL Database Mail Profile
@body = @body,
@body_format ='HTML',
@recipients = 'bruhaspathy@hotmail.com', -- replace with your email address
@subject = 'E-mail in Tabular Format' ;
DROP TABLE #Temp