Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Full Result set - Send Email Task

$
0
0

Hi Friends, 

Please find below, my sample data and create table script

Declare @Current_hour_test table
(
Clinical_Document_ID INT IDENTITY(1,1) NOT NULL,
Patient_First_Name varchar(20) NULL,
Patient_Last_Name varchar(20) NULL,
Patient_DOB date NULL,
Submit_Date datetime NULL,
Facility varchar(100) NULL
)
Insert into @Current_hour_test
Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
Select 'Test','Test','01-01-88','01/15/14','Inpatient' UNION ALL
Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
Select 'Test','Test','01-01-88','02/20/14','Hospital' UNION ALL
Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
Select 'Test','Test','01-01-88',getdate(),'outpatient' 

Select 'www.google.com/page=' + convert(varchar,Clinical_Document_ID) LinkTest from @current_hour_test
where 
clinical_document_ID IN (Select Clinical_Document_ID from @current_hour_test
where submit_date between dateadd(hour,-1,getdate()) and getdate())

Thus the gotten result set, I should send in a email by using send email task. Where I'm stuck is, the result is not a single row. How to send the total result set as email is my question 

and also is there any way I can hyperlink the result such that the result can be clickable?


- please mark correct answers



Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>