Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i have two tables accounts and orders with no common field. now how can i create link between these two tables?
1) Leave them as they are, all combinations will be available in the objects.
2) Join them to obtain a unique table (if tables are big, the join will be slow)
Hope it helps
Why you need to link them and but there is no relation between them why you link them otherwise you can concatnate both tables and take it to the single table.
can u guys give a example?
If your tables are TAB1 and TAB2:
SELECT * FROM TAB1;
join
SELECT * FROM TAB2;
Remember: this solution gives you all the combination af values from both the tables, concatenation gives you only a table but values from a table will not have values from the other table
Write like
Accounts:
Load
*, 'Accounts' as TableFlag
From accounts;
Concatenate(Accounts)
Load
*, 'Orders' as TableFlag
From orders;
Or You can join then also
Accounts:
Load
*, 'Accounts' as TableFlag
From accounts;
Join
Load
*, 'Orders' as TableFlag
From orders;
But if the data is meaning full in both tables then take it into single table if you have sample then provide please.
this is accounts table
this one is orders table
using star schema. orders table is fact table. but no common field between two tables
shall i use concat or join?
these are the two tables i need to display accounts number and account balance
Is there any common date between this two table find that by the common date i believe you can join them and use it in single Order fact table or combination of any two fields also you can join them.
An example:
If you join for each value of Account Number you will have all Customers Id values :
1060 1
1060 41
.... and so on
If you concatenate:
1060 -
1060 -
- 1
- 41