I am trying to execute the following command to force the update to use a non-clustered index:
UPDATE Flights SET Airtime=5555678 WHERE Distance=10000 OPTION (TABLE HINT(Flights, INDEX (DistanceIndex)))
... and this is a mistake:
Msg 8724, Level 16, State 1, Line 75
Unable to complete the request. The table function or OPENROWSET "Flights" cannot be specified in the TABLE HINT clause.
I cannot find clear advice on how the syntax should be properly formed inside the TABLE HINT statement.
Please, can someone tell me where I'm going wrong?
source share