Home » SQL & PL/SQL » SQL & PL/SQL » ORA-00907 : Formatting Error (Oracle 10g)
ORA-00907 : Formatting Error [message #629887] Wed, 17 December 2014 00:58 Go to next message
abhayman
Messages: 37
Registered: August 2011
Location: CA
Member
Hi,

I am getting error while running a query although I don't see any formatting issue.

    SELECT cth.transaction_id,
       cth.so_number
    FROM ABC cth
WHERE    cth.so_number IN
                  (    SELECT TO_NUMBER (TRIM (REGEXP_SUBSTR (TRIM (12104010),
                                                              '[^,]+',
                                                              1,
                                                              LEVEL)))
                                 Freq_Value
                         FROM DUAL
                   CONNECT BY  TRIM (REGEXP_SUBSTR (TRIM (51205501), 
                                                   '[^,]+',
                                                   1,
                                                   LEVEL))
                               IS NOT NULL 
                     ORDER BY LEVEL)


Although the inner condition works fine . The issue is happening only when I add IN condition
Re: ORA-00907 : Formatting Error [message #629889 is a reply to message #629887] Wed, 17 December 2014 01:07 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Well ORA 00907 really seems to be "missing right parenthesis", not "formatting error", so the tool you use might mix something up.

$oerr ORA 00907
00907, 00000, "missing right parenthesis"
// *Cause:
// *Action:


As for the "missing right parenthesis", you can't us an "order by" in an "in" clause.
Re: ORA-00907 : Formatting Error [message #629894 is a reply to message #629887] Wed, 17 December 2014 01:56 Go to previous message
abhayman
Messages: 37
Registered: August 2011
Location: CA
Member
Thank You Thomas

[Updated on: Wed, 17 December 2014 01:56]

Report message to a moderator

Previous Topic: Replacing wrong ID values with calculated ID
Next Topic: table type indexed by binary integer
Goto Forum:
  


Current Time: Fri Apr 19 02:32:10 CDT 2024