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

SQL Warning causes Error in load script

I have a simple SQL load from a view

SELECT *

FROM view_name

When I run the select statement in SSMS I get results. Along with a warning message:

"Warning: The join order has been enforced because a local join hint is used."


Qlikview sees this warning and fails the load script.

Some googling reveals that this warning has something to do with the underlying data in the view query. More info here: http://www.sqlservercentral.com/Forums/Topic1646163-391-1.aspx

The type of warning seems irrelevant to me. What is frustrating is that Qlikview is handling this in such a way that it will not bring any data in, just the warning:

warning.PNG

Does anyone have suggestions on how to overlook the warning? (Other than figuring out how to re-write the underlying view to avoid the warning.)

4 Replies
petter
Partner - Champion III
Partner - Champion III

Have you tried to adjust the ErrorMode variable like this before your load:

SET ErrorMode=0;

Which will supress error messages? Maybe it will retrieve the rows from the result set...

deec
Creator
Creator
Author

Thanks for your suggestion. All this does is skip the error acknowledgement. But the "error" still occurs, so no results are retrieved from the source.

awhitfield
Partner - Champion
Partner - Champion

So, do you get data returned if you run your query in SQL Management Studio?

deec
Creator
Creator
Author

Yes. You get a full result, and the second tab of the results page (the Messages tab) contains a warning letting you know that join hints are in use.

I did some research into this "Warning":

It turns out that "join hints" are perfectly legitimate SQL. It's not something I've ever used before, but these pre-built views I'm using must have some.
examle:
     LEFT OUTER LOOP JOIN - Causes the tables to be used in the join to be analyzed in a loop fashion (good for when one table is significantly smaller than the other)
     as opposed to LEFT OUTER JOIN
    

Both give the same results. But the user gives a hint on how the join should be approached. Other options are HASH and MERGE