sql - find records from previous x days? -


how can come stored procedureroc selects results past 30 days?

where month(requestdate) > 6 , day(requestdate) >= 10  , month(requestdate) < 21 , day(requestdate) < 7 

select * table getdate() >= dateadd(day, -30, getdate()) 

substitute first getdate() appropriate column name.

select * table table.columnname >= dateadd(day, -30, getdate()) 

Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -