Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
user8
Contributor III
Contributor III

Load data error

Hi,

I'm using MS SQL DB and wanted to load data from a DB view.

 

LOAD [Ref No], 
Comment, 
Function;

[vwTable]:
SELECT "Ref No", 
Comment,
Function 
FROM vwTable;

 

It gave an error as below:

Started loading data
The following error occurred:
Connector reply error: SQL##f - SqlState: 42000, ErrorCode: 156, ErrorMsg: Incorrect syntax near the keyword 'Function'.,
The error occurred here:
?
Data has not been loaded. Please correct the error and try loading again.

If I remove the "Function" column from query, it is able to load successfully.  The "Function" column contains alphabet characters and some Null values.

What could be the cause?

Thank you.

Labels (1)
11 Replies
user8
Contributor III
Contributor III
Author

Thanks Arthur. It works. Any idea why I need to add [] and "" to Function?

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

The error shows "function" is a keyword:

Incorrect syntax near the keyword 'Function'.

You need to add "" so that system knows that it is a column, not a keyword in the system.