Home All Groups Group Topic Archive Search About

Select either one field or another as alias

Author
11 May 2005 2:50 PM
Tim P
Hi

I have a SQL Server 2k DB which stores long & short names for items, but one
or other could be null. I want to run a view which displays the short name
(ShortNm) AS ItemNm if it exists but substitutes the long name (LongNm) if
not. Is this possible?

Many thanks for any tips.

TP

Author
18 May 2005 1:19 PM
Tim P
Hi

Thanks to all for their replies.

I apologise for not replying sooner - I had set my prefs to notify me of
replies, which for some reason it didn't do. I came back today and discovered
you'd all replied straight away!

Coalesce looks like the answer to my problem.

Many thanks for your help and apologies again for my rudeness in not
acknowledging your help sooner!

AddThis Social Bookmark Button