I need to make updates/inserts/deletes to a database based on one of the values retrieved.
For instance:
Select Flag, MemberID, LastName, FirstName FROM #tmpTable
The Flag value will be either an 'A', 'C', or 'D'.
If it is an 'A' I need to insert that row into a table. If it is a 'C' I need to make an update to a table. If it is a 'D' I need to delete that row from a table. All of this without a cursor 
Any help would be appreciated.