Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Joining two tables having no common fields using one select query

0 Likes
3,454

Hi Experts,

How to join two tables which are NOT having any field in common using only one select query?

Your help will be appreciated.

Thank you.

7 REPLIES 7
Read only

Former Member
0 Likes
2,096

Hi

What do you mean?

If you want to do a join they should have some common fields

Max

Read only

ThomasZloch
Active Contributor
0 Likes
2,096

This is only possible in the Nth dimension, please see the online documentation for joins using the LEFT OUTER SPACE syntax.

Thomas

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,096

Identify a third table (or more tables) with common fields with your two tables, or change your question either removing JOIN or removing NO COMMON FIELDS, else you wont get many responses and will be left alone in outer space, as suggested by

If you acturally require what you written, better execute two select and merge the two internal tables merging every record from first table with every record of second table, til no more memory is available.

Regards,

Raymond

Read only

0 Likes
2,096

Hi Raymond,

Does that mean I need to identify third table having common fields from both the tables and then performing join of those three tables in single select query?

Thank you.

Regards,

Prajakta

Read only

0 Likes
2,096

Yes as Raymond says

You need to do a join between three tables, the third table has to be used as link

Max

Read only

Former Member
0 Likes
2,096

It might help us to help you, if you define what tables you are talking about (assuming they aren't custom Z tables.)

Cheers,

G.

Read only

Former Member
0 Likes
2,096

Hi,

     If None of the fields are Common in Table , Then it would not be feasible to use Join (Left Or Right)

    1. If You want data in single Row then

     Instead You may loop your Table and modify Fields of other table

    2. If You want to Append data then

     you may use Appending Clause with Select Query  .

Regards