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
 General SQL Server Forums
 New to SQL Server Programming
 Common Table Expressions with PIVOT

Author  Topic 

genius_palli
Starting Member

42 Posts

Posted - 2008-12-04 : 05:58:14
Hi everyone..
I am trying to use PIVOT option with Common Table Expressions, but not able to execute the query.
Can any one please suggest that whether i am in the wrong direction or missing something or what can be the cause of the error.


Please suggest.. really urgent need to solve the problem.
Thanks in advance for your suggestions.

----------------------------------
Every experience has something to learn. Go get it.
Thanks and Regards
genius_palli
Web Developer

karthickbabu
Posting Yak Master

151 Posts

Posted - 2008-12-04 : 06:12:09

http://www.devx.com/dbzone/Article/28165/1954

====================================================
you realize you've made a mistake, take immediate steps to correct it.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-12-04 : 06:13:41
What are you trying to accomplish using both cte and pivot?

Care to show us some sample data and some explanation what you are trying to do?
http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

genius_palli
Starting Member

42 Posts

Posted - 2008-12-04 : 06:57:39
Thanks everyone for suggestions..

I was not aware about :-
its always required to use an aggregate function with pivot's column.

----------------------------------
Every experience has something to learn. Go get it.
Thanks and Regards
genius_palli
Web Developer
Go to Top of Page
   

- Advertisement -