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 |
|
velnias2010
Posting Yak Master
125 Posts |
Posted - 2011-06-14 : 09:41:11
|
| select r.inkexID, name,primaryOrgName FROM organisationRegulatory What I want to change it to is something likeif len(primaryOrgName) > 0 or IS NOT NULL then use name else use primaryOrgName as Name |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-06-14 : 09:54:15
|
| SELECT r.inkexID, COALESCE(primaryOrgName,name) NameFROM organisationRegulatory rorSELECT r.inkexID, CASE WHEN primaryOrgName>'' THEN primaryOrgName ELSE name END NameFROM organisationRegulatory r |
 |
|
|
velnias2010
Posting Yak Master
125 Posts |
Posted - 2011-06-14 : 10:20:02
|
| Great thanks for that |
 |
|
|
|
|
|