Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

Incorrect syntax near keyword <fieldname> when loading data from MS SQL Server/ Azure SQL database

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

Incorrect syntax near keyword <fieldname> when loading data from MS SQL Server/ Azure SQL database

Last Update:

May 17, 2021 3:23:42 AM

Updated By:

Sonja_Bauernfeind

Created date:

Mar 20, 2017 6:01:00 AM

Loading data from Microsoft SQL Server or Azure SQL databases to Qlik Sense fails at one or more specific fields. Upon excluding these fields, the reload works normally. 

Error message shown in the data load progress dialogue and document log is  Incorrect syntax near keyword <fieldname> or Connector reply error ***, although Qlik Sense script editor does not prompt for any syntax error.

The issue is only observed when a number of specific words, such as "Function" or "References", are used as field names in the database. 

data load progress.png

 

Resolution:

Tables/ columns named with reserved keywords should be quoted with double quotes or square brackets in order for the containing SQL query to work.

 

Cause:

Words like "Function", "References" are reserved keywords for Microsoft SQL Server or Azure SQL databases, which cannot be used directly as object names in SQL queries.
A complete list of reserved keywords for for Microsoft SQL Server or Azure SQL can be found at https://msdn.microsoft.com/en-us/library/ms189822.aspx

Labels (1)
Contributors
Version history
Last update:
‎2021-05-17 03:23 AM
Updated by: