Hello, I'm fairly new to SQL, Enterprise Manager and SQL
Server and have
never used Stored Procedures before.
I'm trying to create a procedure, that every Wednesday, at
sends a dynamic email (xp_sendmail??).
The email should send to each address, all the deal names,
I have created two procedures with the select statements
to get the info I need:
CREATE PROCEDURE [owner].[sp_getemails] AS
SELECT mem_email_un, mem_first
WHERE mem_newsletter = 1 AND mem_fakeemail = 0
CREATE PROCEDURE [owner].[sp_getexpired] AS
SELECT deal_name, deal_descript,deal_status_exp, deal_id,
WHERE DateDiff(day, GETDATE(), deal_status_exp) BETWEEN 0
I'm not sure where to go from here. Or even if that was
the right place to start. I think I need to use
haven't found the right documentation on how to use it and
put everything together.
Could someone offer some suggestions and/or point me in
the right direction.
Thanks for your time!