TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kumar Ravishankar
NA
437
8k
Select comma separated value from multiple column
Apr 15 2019 4:07 AM
I need to select value with comma separated from more than one column.
But need to Ignore if value is NULL
this needs to be done in SQL SERVER 2008.
and getting result like
, THE PINNACLE, BUT need to ignore if value IS null (No need of extra comma)
SELECT TOP 100 ISNULL(BuildingNo, '') + isnull(BuildingName, '') AS AddressLine1
,COALESCE(BuildingNo + ', ', '') + COALESCE(BuildingName + ', ', '') AS AddressLine1
,*
FROM v_AddressList VL
Getting result like
, THE PINNACLE, : with extra , in first if value is null
Reply
Answers (
1
)
sql auto generate date function starting month to end month
how to insert a record in table from another table