sql - How get data between two ranges dates -
in sql write select statement fetch data between 2 range dates, using between , ..if use betwenn ('01/01/2013') , ('31/12/2015') data want between specified dates...exclude year of 2014
ex:
select * xxx date between ('01/01/2013') , ('31/12/2013') , date between ('01/01/2015') , ('31/12/2015')
but returned 0 rows.
use or
instead of and
select * your_table date between ('01/01/2013') , ('31/12/2013') or date between ('01/01/2015') , ('31/12/2015')
you don't want data in both date ranges not possible @ same time. want data in either 1 of them.
Comments
Post a Comment