February 8, 2012 at 4:18 am
Hi,
I have table like
Name Type Cost
ABTRAVELSIndica:4 88284.5833333333
ABTRAVELSLuxury Bus:180
ABTRAVELSSumo:6 27037.3333333333
ABTRAVELSTavera:8 50
I want result like
Indica:4 Luxury Bus:18 Sumo:6Tavera:8
ABTRAVELS 88284.5833333333 0 27037.3333 50
Please suggest any query for this
Regards,
Balu Reddy K
February 8, 2012 at 4:44 am
Hi,
You might check pivot: Using PIVOT and UNPIVOT
February 8, 2012 at 4:46 am
balu-1123884 (2/8/2012)
Hi,I have table like
Name Type Cost
ABTRAVELSIndica:4 88284.5833333333
ABTRAVELSLuxury Bus:180
ABTRAVELSSumo:6 27037.3333333333
ABTRAVELSTavera:8 50
I want result like
Indica:4 Luxury Bus:18 Sumo:6Tavera:8
ABTRAVELS 88284.5833333333 0 27037.3333 50
Please suggest any query for this
Regards,
Balu Reddy K
Read this article then post your data and DDL in a readily usable fashion. Help us to help you!! Everyone here is an unpaid volunteer, you are much more likely to get working, tested code if you post readily consumable data and DDL.[/url]
Thanks.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply