Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Help with SQL statement....
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 Tue Jun 27 2000 - 00:00:00 CDT
![]() |
![]() |