join two oracle queries
Posted
by coder247
on Stack Overflow
See other posts from Stack Overflow
or by coder247
Published on 2010-06-09T08:49:46Z
Indexed on
2010/06/09
8:52 UTC
Read the original article
Hit count: 243
I've to query from two tables and want one result.. how can i join these two queries?
First query is querying from two tables and the second one is only from one.
select pt.id,pt.promorow,pt.promocolumn,pt.type,pt.image,pt.style,pt.quota_allowed,ptc.text,pq.quota_left
from promotables pt,promogroups pg ,promotablecontents ptc ,promoquotas pq where pt.id_promogroup = 1 and ptc.country ='049' and ptc.id_promotable = pt.id and pt.id_promogroup = pg.id and pq.id_promotable = pt.id order by pt.promorow,pt.promocolumn
select pt.id,pt.promorow,pt.promocolumn,pt.type,pt.image,pt.style,pt.quota_allowed from promotables pt where pt.type='heading'
© Stack Overflow or respective owner