Link to home
Start Free TrialLog in
Avatar of ram27
ram27

asked on

Stored procedure to retreive data in MS Sql Server

i have a table in below mentioned format:

StateID   ColorID     ColorDesc
21           5             Green
21           18           Red
21            11          A
22           5          Green
22         19          B
23        55          M
27       100       Cofee
27       99        Blue
etc..


I want to stored procedure in MS Sql Server 2005  which should return the output in below format:
sateid   RequiredColorDetails
21         5|Green|18|Red|11|A
22       5|Green|19|B
23      55|M
27      100|Cofee|99|Blue
etc..

Please help me.
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial