select /*+FIRST_ROWS(30)*/ Hint doesn't show up in Oracle

Accepted Solution Solved
Reply
Contributor
Posts: 25
Accepted Solution

select /*+FIRST_ROWS(30)*/ Hint doesn't show up in Oracle

I am trying to create a HINT.

Thanks for helping!

Jim

----my code------------------------------------------------------

   proc sql;
      connect to oracle (user="&user" password="&prcprd_pw" path=&path connection=global preserve_comments);
      execute (create or replace view pax_test_jp as
            select    /*+FIRST_ROWS(30) */
                cust_nbr from pax_cust_earned_map1) by oracle;
      execute (commit) by oracle;

------This is what Shows up in Oracle (notice HINT FIRST_ROWS isn't there.  Bummer )-------

CREATE OR REPLACE FORCE VIEW PRICING_PROD.PAX_TEST_JP (CUST_NBR)

AS

   SELECT cust_nbr FROM pax_cust_earned_map1;

------------------------------------------------------------------------------------------------------


Accepted Solutions
Solution
‎07-16-2013 12:42 PM
Super User
Super User
Posts: 7,074

Re: select /*+FIRST_ROWS(30)*/ Hint doesn't show up in Oracle

Posted in reply to carterson2

All Replies
Solution
‎07-16-2013 12:42 PM
Super User
Super User
Posts: 7,074

Re: select /*+FIRST_ROWS(30)*/ Hint doesn't show up in Oracle

Posted in reply to carterson2

Are you generating the SQL with a macro?

7290 - Oracle hints are not passed when coded in a SAS macro

Contributor
Posts: 25

Re: select /*+FIRST_ROWS(30)*/    Hint doesn't show up in Oracle

Got it.  Thanks, Tom!

      proc sql;
         connect to oracle (user="&user" password="&prcprd_pw" path=&path connection=global preserve_comments);
         execute (commit) by oracle;
         execute (create or replace view pax_test_jp as
               select %str(/)%str(*) +FIRST_ROWS(30) %str(*)%str(/)
                  emp_nbr
               from
                  pax_employee2
         ) by oracle;
         execute (commit) by oracle;
         disconnect from oracle;

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 699 views
  • 0 likes
  • 2 in conversation