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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Appears Simple, i think my brains dead

Author  Topic 

imStuck
Starting Member

8 Posts

Posted - 2005-12-02 : 00:57:45
Hi,
My task is to change this resultset so that a client with multiple roles ie(Holder, payer, payee,nominee) appears only once with the roles seperated by a comma. NOTE: i put '.'s in to make the fields line up.

ID Plan .........Suffix ...Role .........Client
1 |30553...... |X......|Holder...|Hayden, Sharon |
2 |30553...... |X......|Nominee|Gunzler, Jack... |
3 |30553...... |X......|Payee...|Hayden, Sharon |
4 |30553...... |X......|Payer....|Hayden, Sharon |

Desired Ouput
1 |30553 |X |Holder, Payee, Payer |Hayden, Sharon|
2 |30553 |X |Nominee..................|Gunzler, Jack....|

Its friday and my brain is dead and i cant get the solution, Help? anyone?
Dan

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-02 : 01:05:12
Refer this
http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx?Pending=true

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

imStuck
Starting Member

8 Posts

Posted - 2005-12-05 : 00:49:08
Thanks, but that doesnt solve this situation. Im not trying to create delimited fields, but just trying to reduce my result set.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2005-12-05 : 01:04:47
can you post your table structure and more specific sample data with expected result ?
see [url]http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx[/url]


-----------------
[KH]
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-05 : 01:08:06
quote:
Originally posted by imStuck

Thanks, but that doesnt solve this situation. Im not trying to create delimited fields, but just trying to reduce my result set.


Then how do you want to get these?

Desired Ouput
1 |30553 |X |Holder, Payee, Payer |Hayden, Sharon|
2 |30553 |X |Nominee..................|Gunzler, Jack....|


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -