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 |
DURGESH
Posting Yak Master
105 Posts |
Posted - 2009-03-19 : 00:42:28
|
hi all,I have a table with two columns. Col1(varchar),col2(int)as col2 has 0 in few of its records, when I select col2 it should display 1 wherever 0 is there.I don't want to use replace functioncan anybody help me to solve this isssue |
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-03-19 : 01:01:13
|
select col1,case when col2 = 0 then 1 else col2 end as col2 from tablename |
|
|
|
|
|