Avatar of marrowyung

asked on 

email the result the a SQL query out


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

what method we can do , any example for reference.


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

8/22/2022 - Mon