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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-03-04 : 08:19:40
|
| Bill writes "I want to increment a variable in a select statement to provice a data for a blank field.DECLARE @MyCounter INTSET @MyCounter = 1SELECT CASE WHEN Bank_Name IS NULL THEN 'BANK-' + CAST(@MyCounter as CHAR(3)) ELSE Bank_name ENDFROM BANK_TABLE;Can I increment it" |
|
|
cshah1
Constraint Violating Yak Guru
347 Posts |
Posted - 2005-03-04 : 08:52:37
|
| may be this will help youhttp://www.sqlteam.com/item.asp?ItemID=1417 |
 |
|
|
|
|
|