User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 401,573 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,339 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 1878 | Replies: 1
Reply
Join Date: Apr 2007
Posts: 1
Reputation: Corey_56044 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Corey_56044 Corey_56044 is offline Offline
Newbie Poster

help with error ORA-00907

  #1  
Apr 13th, 2007
Please help -
Why can I get this sql to work?

SELECT Count(dsd.price) Total
, dsd.reporting_date
, dsd.reporting_state_type
, dsd.requisition_id Order_id
, round((sum(decode(dsd.reporting_state_type,'SHIPMENT',dsd.price, 0)) - sum(decode(dsd.reporting_state_type,'RETURN_RECEIPT',dsd.price, 0))) Net_Orders
from dw_sales_data dsd, dw_programs dp
where dsd.program_id = dp.program_id
and dsd.program_id = '4387300'
group by dsd.reporting_date, Order_id, dsd.reporting_state_type, Net_Orders_Com, Net_Orders_Ret, Net_Orders;
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2005
Location: Nebraska, U.S.
Posts: 187
Reputation: stupidenator is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
stupidenator's Avatar
stupidenator stupidenator is offline Offline
Junior Poster

Re: help with error ORA-00907

  #2  
Apr 13th, 2007
SELECT Count(dsd.price) Total
, dsd.reporting_date
, dsd.reporting_state_type
, dsd.requisition_id Order_id
, round(sum(decode(dsd.reporting_state_type,'SHIPMENT',dsd.price, 0)) - sum(decode(dsd.reporting_state_type,'RETURN_RECEIPT',dsd.price, 0))) Net_Orders
from dw_sales_data dsd, dw_programs dp
where dsd.program_id = dp.program_id
and dsd.program_id = '4387300'
group by dsd.reporting_date, Order_id, dsd.reporting_state_type, Net_Orders_Com, Net_Orders_Ret, Net_Orders;

ORA-00907: missing right parenthesis
Cause: A left parenthesis has been entered without a closing right parenthesis, or extra information was contained in the parentheses. All parentheses must be entered in pairs.
Action: Correct the syntax and retry the statement.

It looks like you had an extra left parentheses
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 4:04 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC