Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to perform this task without using cursor

Author  Topic 

imranabdulaziz
Yak Posting Veteran

83 Posts

Posted - 2011-02-13 : 23:50:19
Dear All,
I am using SQL Server 2005.
I want to email to employee on their birthday.
I am sending mail through sql server using msdb.dbo.sp_send_dbmail.
What i do is stores all the employee code in a tables type variables.
then looping through each employee with cursor and send the mail using msdb.dbo.sp_send_dbmail

Now I want to know Is there any way to do the same without using cursor

Thank you

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-02-14 : 04:14:23
A cursor is really the only way to go on this one, as far as I know there is no set-based way of doing it.

- Lumbago
My blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/
Go to Top of Page
   

- Advertisement -