SQL syntax

I am getting the below error anyone can elaborate?

Bulk insert: Deferred prepare could not be completed.
Statement(s) could not be prepared.
Incorrect syntax near ‘date’.
Incorrect syntax near ‘date’.


This means that there is a problem with the way that the date is being used in the SQL statement.

To fix this error, you need to check the SQL statement and make sure that the date is being used correctly. The date should be enclosed in single quotes (')


SELECT * FROM table WHERE date = ‘2023-09-12’

Refer this thread for some insights if u r using variable

Cheers @omar_ismail

so you mean that i should rename the date column in the SQL table to be ‘date’? please correct me if I am wrong

No you need pass the value with single quotes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.