Andrew Angell
asked on
How to avoid a syntax error on this UPDATE statement..??
I'm running the following SQL statement and I'm getting a syntax error...
UPDATE Global_Response_Fields SET Timestamp='2011-10-22T08:5 0:34Z', CorrelationID='f1833aed8ee ef'
If I remove the Timestamp value from the update then it works fine, but I'm not sure what about that value is causing me a problem or how to fix it..?? It's just a regular text field that I'm trying to add that string of text into.
Any information on how I can fix this would be greatly appreciated. Thanks!
UPDATE Global_Response_Fields SET Timestamp='2011-10-22T08:5
If I remove the Timestamp value from the update then it works fine, but I'm not sure what about that value is causing me a problem or how to fix it..?? It's just a regular text field that I'm trying to add that string of text into.
Any information on how I can fix this would be greatly appreciated. Thanks!
ASKER
It's not a SELECT statement, it's an UPDATE statement. The table name is Global_Response_Fields
UPDATE Global_Response_Fields SET Timestamp=now() , CorrelationID='f1833aed8ee ef'
Actually you do not even need to update the timestamp...
It will be updated automatically
UPDATE Global_Response_Fields SET CorrelationID='f1833aed8ee ef'
It will be updated automatically
UPDATE Global_Response_Fields SET CorrelationID='f1833aed8ee
What do you want to update then? Only the CorrelationID field for all records in the table? How is your Timestamp field defined?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The value is a string that comes back from the web service I'm working with. I can't just use a local timestamp. I need it to match what the service actually gives me for logging purposes.
I can try changing the name to see if the field name itself is causing the issue. I'll give that a shot and come back to update in a bit.
I can try changing the name to see if the field name itself is causing the issue. I'll give that a shot and come back to update in a bit.
ASKER
It was indeed the use of a field called Timestamp that was causing my problem.
What do you get when you do:
Open in new window