none
SQL Query throwing Warning: The join order has been enforced because a local join hint is used.

    Question

  • Hi All,

    When i am trying to run sql query in SQL 2008,Its throwing warning like
    Warning: The join order has been enforced because a local join hint is used.

    Could anyone can help me how to resolve this issue.
    Maruthi...
    Monday, March 08, 2010 12:30 PM

All replies

  • The warning prettry much says it all. Apparently you have a join hint in the query (I can't verify that since you didn't post the query), and this is only a warning that one want to keep number of such hints down to a minimum. So, either remove that join hint, or just live with and ignore that warning.
    Tibor Karaszi, SQL Server MVP | http://www.karaszi.com/sqlserver/default.asp | http://sqlblog.com/blogs/tibor_karaszi
    Monday, March 08, 2010 12:39 PM
  • Here is the query

    SELECT

     

    KUN.NK_KUN, KUN.KUNDE_TP, FAC.VALUE, HIE.SK_CSIHIE, HIE.L2_NK, FAC.SK_TID 

    FROM

     

    DBO

    .LHGIOCSI_TPL_F_v FAC

    INNER

     

    JOIN DBO.LHFSOORGMEDTEAKUN_L KUN

     

    ON FAC.SK_KUNGRP = KUN.SK_KUNGRP

     

    INNER JOIN

    DBO

    .LHFSOCSIHIE_D HIE

     

    ON FAC.SK_CSIHIE = HIE.SK_CSIHIE


    Maruthi...
    Monday, March 08, 2010 12:44 PM
  • Are other of those two objects views ?  Im guessing that at least one is .


    Dave Ballantyne ---- http://sqlandthelike.blogspot.com
    Monday, March 08, 2010 12:56 PM