Home » SQL & PL/SQL » SQL & PL/SQL » Missing right parenthesis (split)
Missing right parenthesis (split) [message #303369] Fri, 29 February 2008 01:14 Go to next message
SherazGhazi
Messages: 1
Registered: February 2008
Junior Member
hey Guys,

I am getting the same massege (ORA-00907: missing right parenthesis). Please read below query and advise what is wrong with it.

Sheraz

SELECT DISPATCH_MASTERS.DISPATCH_DATE, GEO_POINTS.NAME , ORG_UNITS.NAME, GEO_POINTS_1.NAME, ORG_UNITS_1.NAME, SI_DETAILS.SI_CODE, SI_TO_PROJECTS.PROJECT_CODE, DISPATCH_DETAILS.COMMODITY_CODE,Sum(DISPATCH_DETAILS.QUANTITY_NET)AS MTN, Sum(DISPATCH_DETAILS.QUANTITY_GROSS)AS MTG, Sum(DISPATCH_DETAILS.NUMBER_OF_UNITS)AS UNITS, DISPATCH_MASTERS.TRAN_TYPE_CODE, SUPPLIERS.NAME
FROM DISPATCH_MASTERS, GEO_POINTS, ORG_UNITS, SI_DETAILS, SI_TO_PROJECTS, DISPATCH_DETAILS, SUPPLIERS, COI_TO_SIS, GEO_POINTS_1, ORG_UNITS_1
WHERE COI_TO_SIS.SI_RECORD_ID = SI_DETAILS.SI_RECORD_ID AND SI_DETAILS.SI_RECORD_ID = SI_TO_PROJECTS.SI_RECORD_ID AND DISPATCH_DETAILS.DOCUMENT_CODE = DISPATCH_MASTERS.DOCUMENT_CODE AND DISPATCH_DETAILS.CODE = DISPATCH_MASTERS.CODE AND COI_TO_SIS.ORIGIN_ID = DISPATCH_DETAILS.ORIGIN_ID AND DISPATCH_MASTERS.ORIGIN_LOCATION_CODE = GEO_POINTS.CODE AND DISPATCH_MASTERS.ORIGIN_CODE = ORG_UNITS.CODE AND DISPATCH_MASTERS.DESTINATION_LOCATION_CODE = GEO_POINTS_1.CODE AND DISPATCH_MASTERS.DESTINATION_CODE = ORG_UNITS.CODE_1
GROUP BY DISPATCH_MASTERS.DISPATCH_DATE, GEO_POINTS.NAME, ORG_UNITS.NAME, GEO_POINTS_1.NAME, ORG_UNITS_1.NAME, SI_DETAILS.SI_CODE, SI_TO_PROJECTS.PROJECT_CODE, DISPATCH_DETAILS.COMMODITY_CODE, DISPATCH_MASTERS.TRAN_TYPE_CODE
HAVING DISPATCH_MASTERS.TRAN_TYPE_CODE='WIT';

[Mod-edit: Frank added the actual error-message, after splitting the topic]

[Updated on: Fri, 29 February 2008 02:44] by Moderator

Report message to a moderator

Re: ORA-00907: missing right parenthesis [message #303376 is a reply to message #303369] Fri, 29 February 2008 01:25 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
DOYOUREALLYTHINKWEREADTHISAWFULANDUNFORMATTEDMESSJUSTCOUNTTHEPARENTHESIS?

Regards
Michel
Re: ORA-00907: missing right parenthesis [message #303380 is a reply to message #303376] Fri, 29 February 2008 01:38 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, it is correctly written (at least, Formatter doesn't complain about it). However, why did you use HAVING clause? Why didn't you put that condition into the WHERE clause?
Re: Missing right parenthesis (split) [message #303393 is a reply to message #303369] Fri, 29 February 2008 02:43 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Since this is a very general message, it makes no sense adding a new problem to an existing (and old thread).
Split topic.
Previous Topic: Help needed for BEFORE DELETE Trigger
Next Topic: external tables - which view to query?
Goto Forum:
  


Current Time: Sun Dec 11 08:31:12 CST 2016

Total time taken to generate the page: 0.04357 seconds