Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem joining multiple tables

Status
Not open for further replies.

buzztrex

MIS
Oct 29, 2002
3
0
0
US
i am able to run the following query:

select items.id,
b.userid,b.negg,b.neutg,b.posg,b.noneg,b.negr,b.neutr,b.posr,b.noner,
s.userid,s.negg,s.neutg,s.posg,s.noneg,s.negr,s.neutr,s.posr,s.noner

from items,endharshness b,endharshness s,tempids
where items.id=tempids.id and
b.itemid=tempids.id and
b.userid=tempids.high_bidder and
s.itemid=tempids.id and
s.userid=tempids.seller;


(id is the key on the items table)

but when i try to retrieve any column besides id, like
in the following query, oracle just hangs.
i am truly baffled, can anyone help ?


select items.*,
b.userid,b.negg,b.neutg,b.posg,b.noneg,b.negr,b.neutr,b.posr,b.noner,
s.userid,s.negg,s.neutg,s.posg,s.noneg,s.negr,s.neutr,s.posr,s.noner

from items,endharshness b,endharshness s,tempids
where items.id=tempids.id and
b.itemid=tempids.id and
b.userid=tempids.high_bidder and
s.itemid=tempids.id and
s.userid=tempids.seller;

 

Any errors generated?
Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
i am running this query thru perl.
so when i terminated the perlscript, it exits saying "there was no statement executing, perhaps you should call execute earlier"
 

i should have done that before, here goes:
another clarification, the query doesn't work not for anything besides items.id.

HARSHNESSDATA
(
ItemID ,
userID ,
negR ,
neutR ,
posR ,
noneR ,
negG ,
neutG ,
posG ,
noneG ,
Partnercount
);

key is : itemid+userid

items:
(
id,
title,
description,
seller,
high_bidder,
sale_price
)

key: itemid

tempids:
(id,seller,high_bidder)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top