February 17, 2010 at 4:08 am
please let me know that how can i use the query.
I have the table called OEffort table , in that created date is the column , in which the managers will creat the request . i want to creat the report for every three months , means ...JAn,feb , march,... like that similar for four quaters in year .
My date looks like in the table called created date= "8/18/2009'',
Please provide the query are how can i proceed .i write the query by using between operators also it was not showing , please let me know .
waiting for the response .
Regards
sateesh
February 17, 2010 at 8:05 am
You need a cross table query or pivot predicate which came out in SQL Server 2005.
Try the example provided in the following links:
http://www.paragoncorporation.com/ArticleDetail.aspx?ArticleID=25
http://www.dba-sql-server.com/sql_server_tips/t_super_sql_456_crosstab_queries.htm
http://www.simple-talk.com/sql/t-sql-programming/creating-cross-tab-queries-and-pivot-tables-in-sql
http://www.fmsinc.com/TPapers/access/Reports/monthly/index.html
http://bytes.com/topic/sql-server/answers/144067-crosstab-queries
http://www.sqlservercentral.com/scripts/Miscellaneous/30931/
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply