• sqlenthu 89358 (11/9/2016)


    Thanks mgnson, but I want to do it using SQL programming. Is it possible ?

    Sorry for the delay in response. I've been totally swamped. Using SSRS (Reporting Services) does not mean you won't be using T-SQL. You'll need one query to generate the data that uses a parameter for the customer identifier, and a separate query to identify all the customers, their customer identifier, and their e-mail address. As this appears to be a fairly simple e-mail, you can set the format to PDF, and then it's a matter of putting together a fairly simple report that will get attached to the e-mail as a PDF file.

    That said, you would still need to set up SQL Server to use e-mail, but you'll be doing that to set up the ability to use the sp_send_dbmail stored procedure, and I don't know that setting up either of those abilities is all that different.

    If you don't have the Enterprise version of SQL Server, then the stored procedure to send e-mail is pretty much the only option, but it's actually more challenging, as you'll have to compose the e-mail using T-SQL. Not a pretty task, but certainly not impossible.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)