Feb 9, 2017 #1 dvannoy MIS May 4, 2001 2,765 US I have a field called STATUS. I'm trying to run a procedure that will update the field STATUS if the below code results are > 8 days Code: SELECT DATEDIFF(DAY, DATE_FIELD, GETDATE()) AS DAYS_IN_QUE FROM TABLE any help would be appreciated thanks
I have a field called STATUS. I'm trying to run a procedure that will update the field STATUS if the below code results are > 8 days Code: SELECT DATEDIFF(DAY, DATE_FIELD, GETDATE()) AS DAYS_IN_QUE FROM TABLE any help would be appreciated thanks
Feb 9, 2017 #2 bborissov Programmer May 3, 2005 5,167 BG Code: UPDATE YourTable SET Status = ???? WHERE DATEDIFF(DAY, DATE_FIELD, GETDATE()) > 8 Is this what you want? Borislav Borissov VFP9 SP2, SQL Server Upvote 0 Downvote
Code: UPDATE YourTable SET Status = ???? WHERE DATEDIFF(DAY, DATE_FIELD, GETDATE()) > 8 Is this what you want? Borislav Borissov VFP9 SP2, SQL Server