Skip to Content
0
May 22, 2014 at 01:55 PM

how to restrict data

15 Views

Hi All,

I have an query,

i have data like below

Quarter Amount

1Q 2008 1098046 2Q 2008 1086064 3Q 2008 1070520 4Q 2008 1035790 1Q 2009 1020156 2Q 2009 1018464 3Q 2009 1017317 4Q 2009 1013442 1Q 2010 1007551 2Q 2010 998727 3Q 2010 989713 4Q 2010 983499 1Q 2011 979105 2Q 2011 980793 3Q 2011 986718 4Q 2011 993552 1Q 2012 1001101 2Q 2012 1005139 3Q 2012 1001720 4Q 2012 989727 1Q 2013 985878 2Q 2013 1138789 3Q 2013 1144091 4Q 2013 1144487 1Q 2014 1140507

and i want output with below query

Output : two year period of data

if report run on Jan 2014

it should reflect Jan 2012-Dec. 2013 data

1Q 2012 1001101 2Q 2012 1005139 3Q 2012 1001720 4Q 2012 989727 1Q 2013 985878 2Q 2013 1138789 3Q 2013 1144091 4Q 2013 1144487



for next run

if report run on Apr 2014

it should reflect April 2012 – March 2014 data

2Q 2012 1005139 3Q 2012 1001720 4Q 2012 989727 1Q 2013 985878 2Q 2013 1138789 3Q 2013 1144091 4Q 2013 1144487 1Q 2014 1140507


and so on....


how can i achieve this


please advice


Thanks in advance

Ranjeet