logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

VIEWS: msg#00003

db.oracle.devel

Subject: VIEWS

Hi, I'm trying to create a view. I started with the select statement and
it works well except for when I try to add the function (sum
(soi.quantity*unit_price)

here is my code... can anyone tell me what I am doing wrong.

Thanks a million...

select soi.id as order#, to_char(order_date,'mm/dd/yyyy')as Order_Date,
region, rtrim(employee.emp_fname)||' '||rtrim(employee.emp_lname) as
Sales_Rep,
sales_rep as Rep_ID, company_name,rtrim(fname)||' '||rtrim(lname) as
customer,
'('||substr(customer.phone,1,3)||')'||substr(customer.phone,4,3)||'-
'||substr(customer.phone,7) as phone,
sum(soi.quantity*unit_price) value
from sales_order_items as soi, sales_order, employee, customer, product
where prod_id=product.id and
soi.id=sales_order.id and
cust_id=customer.id and
sales_rep=emp_id
group by soi.id, company_name
order by soi.id
/

Juan
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to leave-oracle-1796914O@xxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo