Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
salmivaara
Contributor II
Contributor II

Qlik Sense does not recognize the end of sql statement?

Hello!

Qlik Sense (Enterprise, September 2019 version) is throwing this error message

error.PNG

 

 

 

 

and this is where the error occurs

query.PNG

 

 

 

 

So, it looks like the drop statement is also handled as a part of the sql query, as if Qlik doesn't recognize the end of the sql statement. Any idea what could be the cause of this? I have had a similar issue once before, in both cases the query is quite long and has many subqueries. Could that have something to do with this? Usually it has not been a problem, though. 

Thanks

1 Solution

Accepted Solutions
salmivaara
Contributor II
Contributor II
Author

Turns out you were on right track. The problem was a single quote mark in a row that was commented with -- notation, somehow that got Qlik all messed up. After removing it the query ran smoothly. Thanks for your tips. 

View solution in original post

4 Replies
marcus_sommer

Usually it shouldn't happens but you could avoid it by following the recommended best practice, like:

connect ...

sql ...

disconnect;

- Marcus 

salmivaara
Contributor II
Contributor II
Author

No success with that, either. Now I just get syntax error from the disconnect statement. It doesn't really matter what comes after the sql statement, it is handled as a part of the query anyway.

marcus_sommer

With this I would tend to say that your sql-statement isn't really valid - maybe any quoting or commenting within it prevents that the ending semi-colon is treated as it. I assume that your statement isn't really just:

select * from table; 

else a bit larger. Just review it again - maybe reducing/removing some things to simplify the matter and after it you could extend the amount again.

- Marcus

salmivaara
Contributor II
Contributor II
Author

Turns out you were on right track. The problem was a single quote mark in a row that was commented with -- notation, somehow that got Qlik all messed up. After removing it the query ran smoothly. Thanks for your tips.