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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Table structure & SP to retrive it back in pivot
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ajit Bodhani
Starting Member

1 Posts

Posted - 07/04/2014 :  10:06:34  Show Profile  Reply with Quote
Hi Team,
Please suggest me to create appropriate table structure to store data and which type of query suppose to use to retrieve it back in the same format.

Input and output of the data
Code |Jan_2014_Activity1 | Jan_2014_Activity2 |.... |Dec_2015_Activity2
XX25 | 12.50 | 5.42 |.... | 10.66

Note :
1)there are 7 activities
2)max columns is near about 150
3)Max rows in 1000's
4)If current month is Jun 2014 then it will take historical data from table for Jan 14 to May 14 and rest of the columns filled from last May 14 data.

Thanks & Regards,

Edited by - Ajit Bodhani on 07/04/2014 11:17:24
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000