Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transform table into crosstab query

Status
Not open for further replies.

ping99

Technical User
Mar 16, 2006
45
CA
Hi all,

I have mytable that had 5 fields:

dateyearmonth typename cause numLoss totalloss

200601 flex aaaaa 10 1000
200602 flex aaaaa 20 2000
200603 flex aaaaa 30 3000
200604 flex aaaaa 40 4000

to get a new crosstab queries table with these results in SQL statment if possible:


200601 200602 200603 200604 Grand Total

flex 10,1000 20,2000 30,3000 40,4000 100, 10000

total 10,1000 20,2000 30,3000 40,4000 100, 10000


10,20,30,40 are numloss fields with grand total of 100

1000,2000,3000,4000 are totalloss fields with grand total of 10000

Any help in coding with SQL crosstab queries would be appreciated

TIA
 
You may be interested by this FAQ: faq701-4524

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top