?
Solved

Sub Query in PL/SQL

Posted on 2012-04-04
4
Medium Priority
?
501 Views
Last Modified: 2012-07-30
Hi Experts

How would I rewrite this query to sum  NETPRICE on WOLINENUMBER and INVOICENUMBER


select * from vw_rpt_preinvoice t

WHERE (WOLINENUMBER = 1 and INVOICENUMBER = '24-127345400')
0
Comment
Question by:December2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 37806439
Have some sample data and expected results?

Off the top of my head a normal SUM(NETPRICE ) function and a group by on WOLINENUMBER and INVOICENUMBER:


select WOLINENUMBER , INVOICENUMBER, sum(NETPRICE)
from vw_rpt_preinvoice t
WHERE (WOLINENUMBER = 1 and INVOICENUMBER = '24-127345400')
group by WOLINENUMBER , INVOICENUMBER;
0
 
LVL 13

Expert Comment

by:Ashok
ID: 37806459
select Sum(NetPrice) from vw_rpt_preinvoice t
WHERE (WOLINENUMBER = 1 and INVOICENUMBER = '24-127345400')
0
 

Author Comment

by:December2000
ID: 37806464
Thanks, I just wanted to make that harder than it was.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
In this article, we’ll look at how to deploy ProxySQL.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question