Home » SQL & PL/SQL » SQL & PL/SQL » select query giving exception (oracle 10g)
select query giving exception [message #428069] Tue, 27 October 2009 02:17 Go to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
SELECT
  /* OPT_DYN_SAMP */
  /*+ ALL_ROWS IGNORE_WHERE_CLAUSE NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false') NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */
  NVL(SUM(C1), :"SYS_B_00"),
  NVL(SUM(C2), :"SYS_B_01"),
  COUNT(DISTINCT C3),
  NVL(SUM(
  CASE
    WHEN C3 IS NULL
    THEN :"SYS_B_02"
    ELSE :"SYS_B_03"
  END), :"SYS_B_04")
FROM
  (SELECT
    /*+ IGNORE_WHERE_CLAUSE NO_PARALLEL("EA") FULL("EA") NO_PARALLEL_INDEX("EA") */
    :"SYS_B_05" AS C1,
    CASE
      WHEN "EA"."APPOINTMENT_STATUS_ID"                                                         =:"SYS_B_06"
      AND TO_DATE(NVL(TO_CHAR("EA"."APPOINTMENT_DATE", :"SYS_B_07"), :"SYS_B_08"), :"SYS_B_09")<=TO_DATE(:"SYS_B_10", :"SYS_B_11")
      THEN :"SYS_B_12"
      ELSE :"SYS_B_13"
    END                  AS C2,
    "EA"."CONSULTANT_ID" AS C3
  FROM "EMRAPPDETAILSSUPPHISTORY" SAMPLE BLOCK (:"  SYS_B_14",:"SYS_B_15") SEED (:"SYS_B_16") "EA") SAMPLESUB



error is like this
Error at Command Line:24 Column:41
Error report:
SQL Error: ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"

what needs to be changed
Re: select query giving exception [message #428072 is a reply to message #428069] Tue, 27 October 2009 02:35 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
What you have analyzed?

By
Vamsi
Re: select query giving exception [message #428074 is a reply to message #428069] Tue, 27 October 2009 02:50 Go to previous messageGo to next message
jigs230678
Messages: 3
Registered: October 2009
Location: Mumbai
Junior Member

Hi,

Enter one more parenthisis ) before SAMPLESUB in below code and try.

FROM "EMRAPPDETAILSSUPPHISTORY" SAMPLE BLOCK (:" SYS_B_14",:"SYS_B_15") SEED (:"SYS_B_16") "EA") SAMPLESUB

Regards,
Jignesh
Re: select query giving exception [message #428083 is a reply to message #428074] Tue, 27 October 2009 03:16 Go to previous messageGo to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
no still the same exception even including one more ')'
Re: select query giving exception [message #428084 is a reply to message #428083] Tue, 27 October 2009 03:26 Go to previous messageGo to next message
Michel Cadot
Messages: 63801
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why are you executing this query?
It is clearly not a documented and supported one.

Regards
Michel
Re: select query giving exception [message #428135 is a reply to message #428074] Tue, 27 October 2009 05:58 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
jigs230678 wrote on Tue, 27 October 2009 08:50
Hi,

Enter one more parenthisis ) before SAMPLESUB in below code and try.

FROM "EMRAPPDETAILSSUPPHISTORY" SAMPLE BLOCK (:" SYS_B_14",:"SYS_B_15") SEED (:"SYS_B_16") "EA") SAMPLESUB

Regards,
Jignesh

Which left parenthesis would this be linked to in your view?
Previous Topic: Rollup
Next Topic: how to create boolean data type in oracle??
Goto Forum:
  


Current Time: Sat Sep 24 18:02:30 CDT 2016

Total time taken to generate the page: 0.14226 seconds