Please help me on below querydeclare @to int, @from int, @year int,@fromyear int, @toyear int
select * from Test where SUBSTRING(Month_Of_Upload,1,1) between @to and @from and
in the above querry if i tried 3-2016 to 5-2016 its wokring fine but if i tried 3-2017 to 5-2017 its not working
here Month_Of_Upload is varchar value saving values like'3-2016'
suppose if want fetch records between '3-2016' to '3-2017' its not wokring
pleas help me here i tried all ways but not getting proper results ...