is there exactly one name for each order, after jumping through the 3 other tables to get there?
if so, try this...
select o.charges,o.cost,
(select n.name from name n., load_s s, load_d d
where n.abrv = s.abrv
and d.load_number = s.load_number
and d.order_number = o.order_num) name
from order o
if there is potentially more than one, then use the query posted by dsacker with this small correction...
select NAME.name,
ORDER.charges,
ORDER.cost
from NAME,
ORDER,
Load_S,
Load_D
where NAME.abrv = Load_S.abrv
and Load_S.load_number = Load_D.load_number
and Load_D.order_number = ORDER.order_num
Main Topics
Browse All Topics





by: dsackerPosted on 2008-05-20 at 11:30:32ID: 21608848
I'm assuming this is Oracle 8i (since you have that as a tag *grin*). Try the code below.
Select allOpen in new window