Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 creating pivot table

Author  Topic 

PRITHA
Starting Member

1 Post

Posted - 2008-07-31 : 12:33:58
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 am asking 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 from the results seen on screen

TRANSFORM sum(cCapacity) AS SumOfCapacity
SELECT jobworker, sum(cCapacity) AS Total
FROM cCapacity
GROUP BY JObWorker
PIVOT contract ;


Thanks and hope an answer .

Pritha

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-31 : 13:03:34
quote:
Originally posted by PRITHA

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 am asking 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 from the results seen on screen

TRANSFORM sum(cCapacity) AS SumOfCapacity
SELECT jobworker, sum(cCapacity) AS Total
FROM cCapacity
GROUP BY JObWorker
PIVOT contract ;


Thanks and hope an answer .

Pritha



Is this access query? If you want Access specific solution please post your question in MS Access forum.
Go to Top of Page
   

- Advertisement -