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 |
|
chava_sree
Yak Posting Veteran
56 Posts |
Posted - 2008-03-21 : 13:37:31
|
| I’ve a subquery which returns more than one row (user_group), and i need to convert those rows into a comma delimited list. i tried with various possibilities but unable to find the solution. can you pls.help.here is my query below.SELECTuser_ID,user_Firstname,user_Lastname,user_Email,Username = (Case When user_Username = ‘ ‘ or user_username is Null then ‘None’ else User_Username end),user_creationdate,Active = (Case When user_Active = 1 then ‘Yes’ else ‘No’ end),User_Group = (Select group_name from usergroup a, usergroup_combo b where a.group_id = b.ug_groupID and b.ug_userid = user_id),TheatreCode = (Case When User_TheaterCode = ‘ ‘ or User_TheaterCode is Null then ‘N/A’ else User_TheaterCode end),JobTitle = (Case When user_JobTitle = ‘ ‘ or User_Jobtitle is Null then ‘N/A’ else User_Jobtitle end)FROM [user]thanks |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
|
|
|
|
|