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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.