February 9, 2006 at 1:04 pm
I used this funtion in the past, but now the name escapes me.
What it does is wrap two columns and if the first column is empty it selects the contents of the second.
If anyone can remember the name plese pass it along. ![]()
thanks on advance
--Ron
 
February 9, 2006 at 1:35 pm
declare @table table
(
some_value varchar(50),
some_other_value varchar(50),
some_other_other_value varchar(50)
)
insert @table
select NULL,NULL,'easy'
union all
select NULL,'as','abc'
union all
select '123',NULL,'abc'
union all
select NULL,NULL,NULL
select coalesce(some_value,some_other_value,some_other_other_value,'Nothing there')
from @table
Mathew J Kulangara
sqladventures.blogspot.com
February 9, 2006 at 1:37 pm
Thank you
![]()
--Ron
 
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply