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
 General SQL Server Forums
 New to SQL Server Programming
 Help required for T-SQL

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2011-02-16 : 09:52:48
Hi ALl,
I am very beginner for T-SQL programming.
From the table we have to filter or process the records as below.

Based on status column i need to have diffeent operation for each row for different each status
Lets say:there are possibalities of only 10 values in that column
if value is 01--then i need to send an email for that person
if value is 02-- then i need to update some record in DB
if value is 03--then i have to send an email to created person with different subject line and body

and so on upto value 10.

What would be the best option to do that for row by row operation to handle this,

Kindly suggest with some algorithm.

Thanks,
Gangadhar

Thanks,
Gangadhara MS
SQL Developer and DBA

RobertKaucher
Posting Yak Master

169 Posts

Posted - 2011-02-16 : 12:35:15
http://msdn.microsoft.com/en-us/library/ms181765.aspx

Should do the trick.

===
http://www.ElementalSQL.com/
Go to Top of Page
   

- Advertisement -