Hi everyone!
Today I encountered the following problem:
We have an SQL-table with a column named "day-number". I'm trying to add a row to this table using dynamic SQL:
INSERT INTO DEV_YR_51.dbo.testtable (day-number, maximum) VALUES (?,?)
After execution I get the following error:
Error: Insert to testtable unsuccessful (-) - Incorrect syntax near the keyword 'day'.
What causes this error? I tried using an underscore instead of a dash, but then the error is "Invalid column name 'day_number'"
Thanks for the help!
Regards,
Raffi
#underscoresql