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

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -