xajid
xajid

Reputation: 1

ORA 00907 Missing Right Parenthesis

I am getting this Error of "Missing Right Parenthesis" on the Query below. Can someone rectify the mistake please?

SELECT 
    DESCRIPTION,
    TOTAL_ADMISSION,
    EMERGENCY,
    NORMAL      
  FROM TABLE (ORDERENTRY.PKG_S04REP00031.ADMISSION_SUMMARY(P_START_DATE = to_date('31/08/2021', 'dd/mm/yyyy')
                                                         P_END_DATE = to_date('01/09/2021', 'dd/mm/yyyy')
                                                         P_ADMISSION_TYPE    = 'NORMAL'
                                                         /*P_ORDER_LOCATION_ID => :P_ORDER_LOCATION_ID, */
                                                         P_LOCATION_ID = 'K01'));

Upvotes: 0

Views: 55

Answers (1)

Roberto Hernandez
Roberto Hernandez

Reputation: 8518

This should work

SELECT 
    DESCRIPTION,
    TOTAL_ADMISSION,
    EMERGENCY,
    NORMAL      
  FROM TABLE (ORDERENTRY.PKG_S04REP00031.ADMISSION_SUMMARY(P_START_DATE => to_date('31/08/2021', 'dd/mm/yyyy') , 
                                                           P_END_DATE   => to_date('01/09/2021', 'dd/mm/yyyy') , 
                                                           P_ADMISSION_TYPE => 'NORMAL' , 
                                                           --P_ORDER_LOCATION_ID => :P_ORDER_LOCATION_ID, 
                                                           P_LOCATION_ID => 'K01')
                                                           );

You are using select from table(package.function, therefore

  • Parameters values in functions or packages follow the sign => not =
  • Parameters are separated by comma
  • I replaced /* */ just for --, just for cosmetic purposes, as both represent comments, but the later is more common when you want to comment just one line

Upvotes: 1

Related Questions