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)
 T-SQL query

Author  Topic 

indio
Starting Member

7 Posts

Posted - 2007-05-04 : 13:40:19
Hi.

I have a T-SQL query which returns values in just one column. See example:

Member Number

123456789
987654321
112233440



Now after testing for some conditions (IF condition A is True update with D, IF condition A is false, leave blank) I need to insert / update the rows with a Delete Flag (value = D) if required or leave blank if not required.

New file should look like below (only first number will have a D):

Member Number Delete Flag

123456789 D
987654321
112233440


Can someone help me with the syntax on it ?

Thank you.

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2007-05-04 : 13:44:25
Look up the syntax for INSERT statements and UPDATE statements in Books Online, and give it your best try. If your code does not work, post it and we will review it for you.

e4 d5 xd5 Nf6
Go to Top of Page

indio
Starting Member

7 Posts

Posted - 2007-05-04 : 13:46:48
OK. sure, thanks.
Go to Top of Page
   

- Advertisement -