Home » SQL & PL/SQL » SQL & PL/SQL » Missing right parenthesis error (Oracle TNS for 64-bit Windows: Version 10.2.0.4.0 - Production. Windows 7)
Missing right parenthesis error [message #613933] Tue, 13 May 2014 12:31 Go to next message
ipisors
Messages: 24
Registered: May 2014
Location: USA [Arizona ... Desert]
Junior Member
I am getting a "missing right parenthesis", it only happens when I include this clause:
    WHERE
        sr.created >= (CURRENT_DATE() - 91) and
        stage_util.job_complete_date(sr_sr.id) is not null   --complete 


Sorry, I had a typo. It errs with this:

    WHERE
        sr.created >= (CURRENT_DATE() - 91) and
        stage_util.job_complete_date(sr.sr_id) is not null   --complete 


I am not sure what is wrong with the SQL ?

[Updated on: Tue, 13 May 2014 12:33]

Report message to a moderator

Re: Missing right parenthesis error [message #613934 is a reply to message #613933] Tue, 13 May 2014 12:35 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
CURRENT_DATE shouldn't have parenthesis at all.
Re: Missing right parenthesis error [message #613935 is a reply to message #613933] Tue, 13 May 2014 12:36 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/

#7
Re: Missing right parenthesis error [message #613936 is a reply to message #613935] Tue, 13 May 2014 12:39 Go to previous messageGo to next message
ipisors
Messages: 24
Registered: May 2014
Location: USA [Arizona ... Desert]
Junior Member
Could have sworn I tried that - but I guess not. Thank you. That worked.
I had thought it was required, based on this webpage: (which also seems to have some non-existent Oracle functions, like CurDate??)
http://docs.oracle.com/cd/E17952_01/refman-5.1-en/date-and-time-functions.html#function_curdate

Black Swan: What is to be done when one feels that one's company would not like them posting their SQL due to overly revealing nature of the labels, aliases, tables etc? I know posting all the code is often ideal, but are there exceptions? Or another way to say this would be, "#11"..

[Updated on: Tue, 13 May 2014 12:42]

Report message to a moderator

Re: Missing right parenthesis error [message #613937 is a reply to message #613936] Tue, 13 May 2014 12:43 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
If anyone thinks that table_name or column_name is a company trade secret, they are beyond paranoid.
I can accept the position not to reveal actual data content.
Re: Missing right parenthesis error [message #613938 is a reply to message #613936] Tue, 13 May 2014 12:46 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The page you viewed is about MySQL, not Oracle.

I already pointed you to Oracle 10g R2 documentation; I'll do it again. Bookmark it and use it when necessary. Oracle functions are here (you'll find CURRENT_DATE in there as well; note that there's the SYSDATE function which is *usually* used - take a look, see the difference and pick the one you find appropriate).
Re: Missing right parenthesis error [message #613939 is a reply to message #613938] Tue, 13 May 2014 12:50 Go to previous messageGo to next message
ipisors
Messages: 24
Registered: May 2014
Location: USA [Arizona ... Desert]
Junior Member
Ok, I must be confused...the page appeared to contain numerous references to Oracle. Thanks - yes I did bookmark the link; from here on out I'll go to the link you referenced first.

BlackSwan:
I can see where you're coming from, but (like many others) I answer to someone else, so my opinion on the subject is irrelevant...For better or worse, many companies regard just about everything relating to their data warehouse as 'not to be made public'. I am not yet sure how my colleagues would react to finding all of their tables, schemas and column names (which basically announce the company business and even some of its profit calculations) being posted to the world. I used to work for a major bank and someone once yelled at me for the simple act of sending an INTERNAL department some information that contained staging server names on a Crystal report request. Why? I can't really tell you...

That said, next time I will try to post a lot more. I am probably erring on the side of caution, but I understand that you need the full picture in order to be able to contribute sometimes. Sorry about that.
Re: Missing right parenthesis error [message #613940 is a reply to message #613939] Tue, 13 May 2014 12:54 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
ipisors

Ok, I must be confused...the page appeared to contain numerous references to Oracle.


MySQL is now owned by Oracle, I suppose that's why.
Re: Missing right parenthesis error [message #613941 is a reply to message #613940] Tue, 13 May 2014 12:55 Go to previous message
ipisors
Messages: 24
Registered: May 2014
Location: USA [Arizona ... Desert]
Junior Member
Ahh - that does make more sense. Thank you for your patience.
Previous Topic: Query To update a table
Next Topic: replace
Goto Forum:
  


Current Time: Wed Apr 24 19:29:11 CDT 2024