Avatar of marrowyung
marrowyung

asked on 

email the result the a SQL query out

hi,

we tried to email the result of the query to an email address.

what method we can do , any example for reference.

Query:

SELECT * FROM [QueryProcessHistory] WHERE collection_time BETWEEN '2021-07-28 00:00:00.000' AND '2021-07-28 23:59:00.000' order by collection_time desc ;

Open in new window


we want to set the task run daily at 3am and the data should include 00:00:00 to 23:59:59 of previous day

Microsoft SQL Server

Avatar of undefined
Last Comment
marrowyung

8/22/2022 - Mon