Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to join three tables without common any fields?

3029265Sep 10 2015 — edited Sep 16 2015

I need to join three tables but there is no common fields for first table. There is one common field called 'bipad' between second and third table.

I need to join three tables as like below code without any condition. How to achieve it?

I'm getting error when I ran the code below.

select WH_NO,WH_NAME,CITY_NAME,STATE_ALPHA  from MASSH.ACCOUNT

union

select sum(copies) as totalcopies from EMS.TBK_WS_DRAW_SALE_TRANSACTION where bipad in (10227,32686)

union

select ISSUE_NAME,ISSUE_NO,ONSALE_DATE,OFFSALE_DATE from MASSH.ISSUE where bipad in (10227,32686) and (ISSUE_YEAR=2015);

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2015
Added on Sep 10 2015
41 comments
4,536 views