943,614 Members | Top Members by Rank

Ad:
  • MS SQL Discussion Thread
  • Unsolved
  • Views: 5480
  • MS SQL RSS
Jul 31st, 2008
0

creating pivot table

Expand Post »
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

sql Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pritha is offline Offline
1 posts
since Jul 2008
Aug 15th, 2008
0

Re: creating pivot table

Hi,

What are you using Access, MSSQL 2000 or MSSQL 2005
Reputation Points: 13
Solved Threads: 29
Junior Poster
kb.net is offline Offline
169 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS SQL Forum Timeline: Combobox selected value - colored in datagridview
Next Thread in MS SQL Forum Timeline: How to read the data from Table Variable





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC