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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Beginner SQL question (select statement)

Re: Beginner SQL question (select statement)

From: Lun Wing San (Oracle) <wslun_at_qrcsun.qrc.org>
Date: 1996/12/20
Message-ID: <32BB8742.4A6C@qrcsun.qrc.org>#1/1

Atif Ahmad Khan wrote:
>
> I have 2 tables. 1. Product 2. Warehouses. Products has the rows :
> part_number, warehouse_id1, warehouse_id2, qty_available_1, qty_available_2
> values (123456, 100 , 200 , 500, 400)
> Warehouses has : warehouseid, warehouse_location.
> values (100 , Houston
> 200 , Phoenix)

  select warehouse_location, qty_available1 from product, warehouses   where part_number = '123456' and warehouseid = warehouse_id1   union
  ( select warehouse_location, qty_available2 from product, warehouses

     where part_number = '123456' and warehouseid = warehouse_id2   )

---
Name   : Lun Wing San
Title  : Oracle Application Developer of Hong Kong Productivity Council
         Oracle Database Administrator and System Administrator of QRC
Phone  : (852)27885841
Received on Fri Dec 20 1996 - 00:00:00 CST

Original text of this message

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