Error when trying to use SQL stored procedure as a Source
Use bulk data load and an ODBC connection to SQL I am getting an error.
I typed this into the SQL window
exec IS_APSelectAmountsandGLaccountsforsmartconnect
and received this error
ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near the keyword 'top'.
It previews ok but doesn't validate and can't select key fields. Any idea why and how I can fix it?
I typed this into the SQL window
exec IS_APSelectAmountsandGLaccountsforsmartconnect
and received this error
ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near the keyword 'top'.
It previews ok but doesn't validate and can't select key fields. Any idea why and how I can fix it?
Answers
Best Answer
Hey Proy, You are using a SQL Reserved word of 'Select' in your procedure name. When the system tries to parse that out it throws the error. Rename your stored procedure to not include any SQL reserved words and you should be good.
Thanks for the response. We figured out the solution before you posted the response by trial and error. It is good to get confirmation that using a reserved word is not allowed in stored procedures used by smart connect.