By simply said that....I have a sql to show this table:
ID YEARS MONTHS SM
-- ----- ------ --
1 2009 Jan 54662
1 2009 Feb 23467
1 2009 Mar 25246
1 2009 Apr 35556
1 2009 May 35856
1 2009 Jun 46200
1 2009 Jul 69411
1 2009 Aug 26030
1 2009 Sep 26276
1 2009 Oct 21192
1 2009 Nov 68508
1 2009 Dec 43701
1 2010 Jan 35448
1 2010 Feb 26564
1 2010 Mar 60720
1 2010 Apr 59606
1 2010 May 53005
1 2010 Jun 37847
1 2010 Jul 35977
1 2010 Aug 70383
1 2010 Sep 35701
1 2010 Oct 43946
1 2010 Nov 35739
1 2010 Dec 72686
24 rows selected
SQL that I am using:
select id,years,months,sm from test_v2
where years in (2009,2010)
I have tried this statement but it shows very strange for only taking Jan,Jun and Jul but not months between Jan-Jun...
select id,years,months,sm from test_v2
where years in (2009,2010)
and
(months between 'Jan' and 'Jun')
Please help for retrieving the value between Jan and Jun.....
Thanks everyone helps :)