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 |
mgoomba
Starting Member
10 Posts |
Posted - 2006-08-24 : 13:44:04
|
I am migrating my MS Access db to SQL ServerOne of my queries i have to following condional logic that i need to convert to TSQL. I've looked in some books and not quite been able to get the syntax to work. Anyways, this is what im working with:iif(titlePrefix is null,'',[titlePrefix] & ' ') + title + iif(season is null,'',': ' & [season]) as titleThanks for any help!! |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-24 : 13:48:18
|
select ISNULL(titlePrefix + ' ', '') + title + ISNULL(': ' + season, '')Peter LarssonHelsingborg, Sweden |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-26 : 05:31:37
|
or use COALESCE in place of ISNULLMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|