Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

DB hints select query

Former Member
0 Kudos

HI SAP GURUs,

I have a DB HINT select query & I have to change this into OPEN SQL.

But first am not understanding below DB hint query itself. SO request you to please guide me on below.

SELECT FIELD1

               FIELD2

               FIELD3

               FROM ABC

               INTO TABLE ITAB

               WHERE FIELD1 = VALUE

               %_HINTS ORACLE 'LEADING (ABC.T1) USE_NL (ABC.T2)'.

Thanks,

Shabareesh

3 REPLIES 3

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

I don't understand your question.

What do you mean with

 I have to change this into OPEN SQL ?

The above statement is already Open SQL.

The addition "%_HINTS ORACLE" is an addition in Open SQL.

After the addition, you enter an Oracle specific hint.

You can enter more than one addition %_HINTS for the same and for other DBs.

There are no OPEN SQL specific hints (at least no documented ones that you can use).

See note 129385.

Horst

0 Kudos

Hi Horst,

Thanks for your reply.

Sorry for typo error, I mean, need to remove HINTS in my select query but will ensure that it should work same after if we remove HINTS also.

So to do that need to understand the query.

Thanks,

Shabareesh

raymond_giuseppi
Active Contributor
0 Kudos

If you actually want to understand the Oracle hint, I suggest you first search/read online Oracle documentation (e.g. Understanding Optimizer Hints and Using Optimizer Hints.)

  • Else what do you intend to do? This is already an Open SQL statement (as Horst wrote) , remove the hint, change database for the hint, switch to native sql?
  • Are your Oracle statistics up to date?
  • Could you provide the real statement, LEADING and USE_NL are related to JOIN so your code make no sense for me?

Regards,

Raymond