Hello fellow programmers,
I have a situation that I need help with, I have a VB front end and a MS-SQL back end. I need to automate an update query to run once every 24 hours in order to track some inventory items. A sample of my query is as follows:
UPDATE Tools03 SET TransCode = 3, TransDesc = 'Missing', StatusDate = CONVERT(char(30), GETDATE(), 1),LastUpdate_ID = 'TRM',LastUpdate_ts = CONVERT(char(30), GETDATE(), 1),Time = CONVERT(char(30), GETDATE(), 8)
WHERE TransCode = 1 AND Statusdate = '7/7/2004'
Here is what I am trying to accomplish:
1. Automate the above query to once every 24 hours.
2. I need to calulate in my where clause, StatusDate = (Today's date - 5 days).
The above is needed because what it does is to change items in 1 field so that they can populate several reports.
Any help or light that you can shed on this matter is appreciated, thank you.
James
I have a situation that I need help with, I have a VB front end and a MS-SQL back end. I need to automate an update query to run once every 24 hours in order to track some inventory items. A sample of my query is as follows:
UPDATE Tools03 SET TransCode = 3, TransDesc = 'Missing', StatusDate = CONVERT(char(30), GETDATE(), 1),LastUpdate_ID = 'TRM',LastUpdate_ts = CONVERT(char(30), GETDATE(), 1),Time = CONVERT(char(30), GETDATE(), 8)
WHERE TransCode = 1 AND Statusdate = '7/7/2004'
Here is what I am trying to accomplish:
1. Automate the above query to once every 24 hours.
2. I need to calulate in my where clause, StatusDate = (Today's date - 5 days).
The above is needed because what it does is to change items in 1 field so that they can populate several reports.
Any help or light that you can shed on this matter is appreciated, thank you.
James