Using cursor in dbMail in sql server 2008
问题 I am trying to send remittance info to our customers with check# and amount on the check. I am unable to send one email per customer with check num and amount and remittance info. Right now email gets generated but it is only picking one customer and sending emails equal to num of records which get pulled. Please have a look at my query below, probably I am messing up in the cursor part. New code Declare @body nvarchar(max) declare @docnum nvarchar(50) declare @numatcard nvarchar(50) declare