Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Help with SQL statement....

Re: Help with SQL statement....

From: Mike Rainville <mrainv_at_po-box.mcgill.ca>
Date: 2000/07/06
Message-ID: <3964C3A9.453625C5@po-box.mcgill.ca>#1/1

SELECT ... sales.actual_cost ... ?

mAd hAcker wrote:

> Not having written SQL statements in Oracle before, I'd like to ask for some
> help from you guys....
>
> I have a table which has codes for states and for products......these are
> related to a state table and product table, which have the name of the state
> and product (which are what I want to display - instead of the obscure code)
> Now, I know that this is a join query.....but what exactly is the syntax?
> Here's what I have.....
>
> CURSOR c_sales
> IS
> SELECT sales.date_started, products.name, states.name,
> sales.sale_length, sales.price
> FROM states, sales, products
> WHERE sales.product_id = products.product_id
> AND state.state_code = sales.state_code
> ORDER BY actual_cost
> ;
>
> Is this close? What am I missing? Thanks in advance for any help!!
Received on Thu Jul 06 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US