Link to home
Start Free TrialLog in
Avatar of Sue Taylor
Sue TaylorFlag for United States of America

asked on

SQL DATE Past due to current wek

I'd like to show dates in SQL between PAST DUE and the Current Week.  Can someone tell me the correct syntax for that?  

Where (Status = 'pending') AND (NextDate ???????????????
Avatar of YZlat
YZlat
Flag of United States of America image

Are you trying to display all records where NextDate is between PAST_DUE date and current dat?

Where Status = 'pending' AND NextDate BETWEEN PAST_DUE AND GETDATE()

Open in new window

Avatar of Sue Taylor

ASKER

I AM TRYING TO DISPLAY ALL RECORDS WHERE NEXTDATE IS EITHER PAST DUE OR IN THE CURRENT WEEK.  SO IF IT'S MONDAY MAY 1, 2017, IT WOULD SHOW DATES FOR 5/1/17, 5/2/17, 5/3/17, 5/4/17, 5/5/17, 5/6/17, 5/7/17 AS WELL AS ANYTHING THAT WAS STILL 'PENDING' WITH A DATE OF BEFORE TODAY LIKE 1/1/2011, 5/12/2016
ASKER CERTIFIED SOLUTION
Avatar of YZlat
YZlat
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you!