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 |
|
satheesh
Posting Yak Master
152 Posts |
Posted - 2011-03-18 : 08:15:11
|
| Hi all,I need to display dummy value in report after merging 2 columns 1.ie.isnull(cst.cstid,'')+ isnull(cst.cstidlive,'') as cstIDhere i need to diplay,if the id '21' i need to show in the report as 578 (instead of 21) in cstid field.How to do this.case cst.cstid when 21 then 578 else cst.cstid end as cstid will do the dummy convertion but i want to merge the 2 field first and then need to convert.(ie.how to merge the 2 queies)Any help would be highly appreciated.Regards,SG |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-03-18 : 08:34:21
|
Maybe you mean this?case when isnull(cst.cstid,'')+ isnull(cst.cstidlive,'')=21 then 578 else isnull(cst.cstid,'')+ isnull(cst.cstidlive,'') end as cstID No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
satheesh
Posting Yak Master
152 Posts |
Posted - 2011-03-18 : 08:45:37
|
| Thanks webfredYou right and its working.Thanks a lot. |
 |
|
|
|
|
|