I just spent a couple of hours trying to figure out why my Update SQL was failing. The only error I received said:
Error in : update attempt
Line: 14 - Syntax error in UPDATE statement
After making many web searches and trying many combinations of quotes and apostrophes I finally discovered that two of the table names in the Excel file I was updating were reserved words. "Left" and "Top" can't be accessed in an update SQL. Here's a Microsoft web page with all reserved words.
https://docs.microsoft.com/en-us/sql/t- ... ansact-sql
Odd thing is there is no failure using those same column names when I do a query of the same Excel file.
AND... Yes, I know I could save myself the headache if I simply used the Macro Scheduler Excel functions. Problem is I vacillate between capturing data from Excel and data from our Pervasive database so writing scripts using only ODBC makes things consistent. I have written update scripts before, apparently got lucky enough not to stumble over the reserved words prior to today.
Example scripts and tips (replaces Old Scripts & Tips archive)
1 post • Page 1 of 1