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.
Author |
Topic |
bfunny21
Starting Member
4 Posts |
Posted - 2010-09-15 : 16:33:57
|
hi i have my input table as followsID----total_amt-----total_month--------start_date 1-----1200000--------6-------------- 9/4/20092---- 300000---------3 ---------------- 1/1/20063---- 300000---------10--------------- 9/6/200645 ...so onand i want a way to get the output as ID-----sept'09----oct'09----nov'09-----dec'09-----total for 2009---jan'10-----feb10----Tot1---200000---200000---200000--- 200000----- 800000------ 200000----200000-- ----- jan'06----- feb'06----- mar'06----- Total for 2006 2-----100000---- 100000-----100000---- 300000 divide the amount as per the total number of monthsI am desperately looking for some piece of code to get this type of out put .... kindly help me out of this. |
|
X002548
Not Just a Number
15586 Posts |
|
bfunny21
Starting Member
4 Posts |
Posted - 2010-09-15 : 17:08:09
|
quote: Originally posted by X002548 could ou be a little more descriptive...like how your sample data transforms into your result set?I don't see itBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam
hi BrettActually the input table is the only table which i have and from that table i have to transform the data as per my output table .... as i see i have to divide the table as per the number of months starting from the starting month based on start date and the amt will be same for all months ...am i making sense ??? |
 |
|
|
|
|