Month & Year filter in SQL Server -


i have sql server table following columns:

sql table

now, have write query return me records "month > may" , "f year > 2016".

i providing both "month" (may) & "f year" (2016) application. there multiple records same month & f year column values.

i tried date part, cast etc. not getting required result.

you can (with month name)

select * tablename datepart(mm, ([month] + ' 01 2016'))  > datepart(mm,'may' + ' 01 2016')    , fyear > 2016 

or (with month number)

select * tablename datepart(mm, ([month] + ' 01 2016'))  > 5   , fyear > 2016 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -