Click here to Skip to main content
15,997,491 members

Comments by praveen.victor (Top 4 by date)

praveen.victor 24-Feb-14 7:51am View    
When the table3 Data is is:
id month year value
115206 3 2009 8780
115206 6 2009 8780
115206 10 2009 11025
115206 5 2010 13650
115206 5 2011 16975
115206 8 2011 16975
115206 11 2011 16975
115206 1 2012 16975
115206 6 2012 18450
115206 7 2012 18450
115206 8 2012 18450
115206 9 2012 18450
115206 10 2012 18450
115206 12 2012 18450
115206 4 2013 18450
115206 5 2013 18450
115206 6 2013 18450
115206 7 2013 18450
115206 8 2013 19675
115206 10 2013 19675

Table4 data is :

month year
4 2012
5 2012
6 2012
7 2012
8 2012
9 2012
10 2012
11 2012
12 2012
1 2013
2 2013
3 2013
4 2013
5 2013
6 2013
7 2013
8 2013
9 2013
10 2013
11 2013
12 2013



The out put i am getting is :

month year amt
4 2012 18450
5 2012 18450
6 2012 18450
7 2012 18450
8 2012 19675
9 2012 19675
10 2012 19675
11 2012 19675
12 2012 19675
1 2013 16975
2 2013 16975
3 2013 16975
4 2013 18450
5 2013 18450
6 2013 18450
7 2013 18450
8 2013 19675
9 2013 19675
10 2013 19675
11 2013 19675
12 2013 19675


in the output the 2013 year 1,2 and 3 month value are wrong..

PLease help on this
praveen.victor 20-Feb-14 8:21am View    
its not satisfying the requirment
praveen.victor 20-Feb-14 8:20am View    
In this Query values are hard coded. need a dynamic query
praveen.victor 20-Feb-14 8:02am View    
Deleted
ok...