Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My first table has column A ,B C and Date column
Second table has column A Z E and Date
Should i let the tables join only on the column "Date" ? Or both Date and A ? I was told joining tables on Date column is bad practice , not sure if this is true .
See the uniqueness it both this table is best practice other wise you have to use both
Ex:-
FirstTable:
Load A as FirstA ,B C, Date as FirstDate A&Date as Key from Location;
Join
Secondtable:
Load A as SecondA,Z, E, Date as SecondDate, A&Date as Key From Location;
Regards
Anand
Hi,
What does does both table contain.
Join on field instead?
In this case A and rename Date field in second table?
Hope it helps
Regards
ASHFAQ
See the uniqueness it both this table is best practice other wise you have to use both
Ex:-
FirstTable:
Load A as FirstA ,B C, Date as FirstDate A&Date as Key from Location;
Join
Secondtable:
Load A as SecondA,Z, E, Date as SecondDate, A&Date as Key From Location;
Regards
Anand
it depends on your data model, if the link should be on combination Date and column A or just A, because you will end up with different results based on the join fields, but regarding the Date column if this is QlikView Date which is number based you will not have any problem with that and it is not a bad practice.
It depend on your data structure, what is column A? If it is a primary key you should use that column, if your dates represent different information (Eg. invoice date and Order Date) it will not be a good idea joining tables on date field.
Hope it helps
If i join on A only and i select a value in column A and choose a date eg September , how will qlikview know to show me column Z and E date only for date September from that table , i assume it will show me column Z and E for all the months ?
If i join on date from my understanding it should work .
If i join on combination of A and Date it should also work .
If i hoin on A only , i think this wont work .
Which is the better option ?
Then Yusuf:
Join works on fields that have the same name so join on A, Date or their combination works but this is not the only condition because Join must logically link two or more tables according to a logic. The logic is given always (following DB logic) from primary Key, that is the field or fields that univocally identify records. Sometimes we do not have this information so we need other rules. Probably even if your tables have the same field A this field do not has the same kind of information so it do not work. If the only other field that can link the tables is Date then the only solution is using it for the join
add