SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
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
 New Topic  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,
Ajit

Edited by - Ajit Bodhani on 07/04/2014 11:17:24
  Previous Topic Topic Next Topic  
 New 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.05 seconds. Powered By: Snitz Forums 2000