[RESOLVED] What's wrong with this SQL "Update" statement?
UPDATE PROD.Customer
SET Prod.Customer.Rooms_Used = '4'
WHERE ID LIKE '%00'
AND CANCELLED <> 'Y'
AND DATE <= To_Date ('2005/06/30','YYYY/MM/DD')
It used "Debug.Print" to give me the results of a query I have in VB.
This is what VB is sending Oracle, but it keeps coming back saying "Missing Expression". Any ideas as to why?
Re: What's wrong with this SQL "Update" statement?
Quote:
Originally Posted by The_Grudge
UPDATE PROD.Customer
SET Prod.Customer.Rooms_Used = '4'
WHERE ID LIKE '%00'
AND CANCELLED <> 'Y'
AND DATE <= To_Date ('2005/06/30','YYYY/MM/DD')
It used "Debug.Print" to give me the results of a query I have in VB.
This is what VB is sending Oracle, but it keeps coming back saying "Missing Expression". Any ideas as to why?
Not sure about ORACLE, but in MS SQL those ID and DATE column names are reserved keywords and need to be in []-brackets (such as [DATE] <=...) in order to work.
May be that the OLEDB provider requires that also...
Re: What's wrong with this SQL "Update" statement?
It's amazing how just entering the actual names of the fields can fix everything! :sick:
I have no field named "DATE". It's called "END_DATE".
Yikes.