We have stored procedures run by SQL Jobs in which there are queries that use inner loop joins.
These inner loop joins are causing warning messages:
"Warning: The join order has been enforced because a local join hint is used. [SQLSTATE 01000] (Message 8625)"
that get passed up to the sql job and register with the DBAs as a failure of the job.
Assuming that we have to keep the inner loop join, is there a way to suppress these messages within the stored procedure or prevent them from being generated in the first place?
I thought of A try catch block, but this will only capture errors.
Also, adding the "option (force order)" to the query will quell the warning message, but then the join order of the tables in the query will be hardened.
Thanks in advance.