1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Index Hint No Longer Supported In 11+?

Discussion in 'SQL-92' started by pinne65, Sep 13, 2017.

  1. pinne65

    pinne65 Member

    On OE 11.6, RHEL 5.11 in the procedure editor:

    Don't remember if/when I used index hins before. But I can't get it to work.

    SELECT Order.orderNum,
    FROM Order WITH (INDEX(updatedAtIdx))
    WHERE DATETIME('2017-09-12 00:00:00') <= updatedAt
    AND tranType = 'order'


    ** Unable to understand after -- "FROM Order WITH". (247)
    ** Line 6. Invalid SQL statement. (945)

    Manual says this though:

    SELECT column_list
    FROM table_name [ [ AS ] table_alias ]
    [ WITH (INDEX ( index_val ))] ...
    WHERE ...

    Any hints?
  3. Rob Fitzpatrick

    Rob Fitzpatrick ProgressTalk.com Sponsor

    It seems to me that index hints are for the SQL92 query engine only. When you enter SQL statements in the procedure editor you are using the deprecated SQL89 interface in the 4GL engine.

    Try using sqlexp or some other SQL client instead.
  4. pinne65

    pinne65 Member

    Deng - all these years and I didn't know - Thanks for opening my eyes!

Share This Page