creating pivot table

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2008
Posts: 1
Reputation: pritha is an unknown quantity at this point 
Solved Threads: 0
pritha pritha is offline Offline
Newbie Poster

creating pivot table

 
0
  #1
Jul 31st, 2008
Hello,

Before posing question I have googled on pivot query,pivot sql query but none of the sites explained the syntax abut making a new table from a pivot query .And that's the reason I asked the question .I know the pivot query but how make a table of the results from the query.
Using INTO for the pivot query didn't work.

The following query works but I want to make a table

  1. TRANSFORM sum(cCapacity) AS SumOfCapacity
  2. SELECT jobworker, sum(cCapacity) AS Total
  3. FROM cCapacity
  4. GROUP BY JObWorker
  5. PIVOT contract ;


Thanks .

Pritha
Last edited by peter_budo; Aug 1st, 2008 at 12:30 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 160
Reputation: kb.net is an unknown quantity at this point 
Solved Threads: 26
kb.net's Avatar
kb.net kb.net is offline Offline
Junior Poster

Re: creating pivot table

 
0
  #2
Aug 15th, 2008
Hi,

What are you using Access, MSSQL 2000 or MSSQL 2005
It is never about the number of languages you know, you either have the logic of programming or you don't ...

Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MS SQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC