Home » SQL & PL/SQL » SQL & PL/SQL » error in executing procedure
error in executing procedure [message #294270] Thu, 17 January 2008 00:49 Go to next message
dmerin
Messages: 30
Registered: December 2007
Member
Hi,

Please go through the attachment
I was able to succcessfully compile the procedure
but when i tried to execute using command
exec porc name
its showing following error:

ERROR at line 1:
ORA-00979: not a GROUP BY expression
ORA-06512: at "APPS.ORDER_DET_INSERT", line 12
ORA-06512: at line 1

Please help me out
  • Attachment: insert.txt
    (Size: 0.70KB, Downloaded 486 times)
Re: error in executing procedure [message #294275 is a reply to message #294270] Thu, 17 January 2008 00:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
The atachment contains only few lines why don't you post them?
Format and indent them, use code tags and post it here.

Generally speaking, the error comes from that some expressions that are not in aggregate functions are not in "the group by" clause.

Regards
Michel
Re: error in executing procedure [message #294277 is a reply to message #294270] Thu, 17 January 2008 01:16 Go to previous messageGo to next message
shankar muthusamy
Messages: 21
Registered: November 2006
Location: singapore
Junior Member
Hi


select 'OD'||TO_CHAR(LPAD(NVL(MAX(SUBSTR(order_det_id,3)),0)+1,3,0)) ORDER_DET_ID,
xxtro_orders.order_ID ORDER_ID,'P'||TO_CHAR(LPAD(NVL(MAX(SUBSTR(order_det_id,3)),0)+1,3,0)) PRODUCT_ID,
quantity+5,rate+2,quantity*rate
FROM xxtro_orders,order_details where xxtro_orders.order_id=c_order
GROUP BY xxtro_orders.ORDER_ID;

In the above query, group by based on order_id what about quantity,rate - Try to execute the query in Sql you can feel it.

Regards
Shankar.M
Re: error in executing procedure [message #294278 is a reply to message #294277] Thu, 17 January 2008 01:21 Go to previous messageGo to next message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button to verify.

Regards
Michel

[Updated on: Thu, 17 January 2008 01:21]

Report message to a moderator

Re: error in executing procedure [message #294285 is a reply to message #294270] Thu, 17 January 2008 01:41 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

It is because you used

Quote:
quantity+5,rate+2,quantity*rate


in the query apart from ORDER_ID. Please have a look at the GROUP BY usage

By the way why can't you format your query ? Otherwise it will will be difficult for membaers to answer your query .

Thumbs Up
Rajuvan.

[Updated on: Thu, 17 January 2008 01:43]

Report message to a moderator

Re: error in executing procedure [message #294348 is a reply to message #294285] Thu, 17 January 2008 05:14 Go to previous message
dmerin
Messages: 30
Registered: December 2007
Member
Hi,

Thanks a lot for the solution
i got the output


Previous Topic: partitioning table with sequence made in java base 36
Next Topic: getting error when executing procedure(ORA-01562:)
Goto Forum:
  


Current Time: Sun Feb 09 05:40:32 CST 2025