Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i m trying import the excels of 3 4 tables and i m getting $syn fields and tables created, i have tried concatenate but becuase of concatenate is there any diffrence in the result of join with syn table and with concatenate command?
Please can any one tell me that?
Hi,
Syn table is created because there are more than one field common in your tables.
If your primary key is more than one field then create a concatenated key by using Col1&Col2... and alias the col1 and col2 in any one table. Now you dont have more than one column common so it wont show u syntehetic key.
Hope this will help you.
hi,
When you do not specify map conditions, QV will automatically map the fields with same name and make $syn key.
The tables are then mapped with the help of these $syn keys,
but in concatinate and join. syn key is not created but the whole table is merged into one.
In join the matched fields which have same records are merged into one record, i.e no duplicacy.
But in Concatenate, the tableis simply append below another.
Example:
We have two table
A and B
now when we do not use join or concatinate , it will create &syn key:
in join, matching records of common fiels(x and A) will be merged
The result is:
in concatinate , the records are append to the table, a1 a2 a3 will not mapped in this case:
Here is this example attached, hope it help you:
Regards,
Arun Goel
ok arun i dont wnt duplicacy in my case.
Do you know how to join the tables?
hi,
just use JOIN keyword between two load statements.
You can also use QUALIFY and UNQUALIFY to map selected fields of your choice.
Hi Arun,
Thanks for your help.
I tried the qualify but I didn’t get correct result what is syntax I means do we need to add only the command qualify or something else?
Qualify *;
UnQualify ID;
Table1:
Load
ID,
A,B,C
From T1.qvd;
UnQualify ID;
Table2:
Load
ID,
A1,B1,C1
From T2.qvd;
UnQualify *;
hi,
Suppose in my example, you want to map only field A then:
USE:
QUALIFY *;
UNQUALIFY A;
LOAD * INLINE [
x, A, B, C
1, a1, b1, c1
2, a2, b2, c2
3, a3, b3, c3
4, a4, b4, c4
5, a5, b5, c5
6, a6, b6, c6
];
QUALIFY *;
UNQUALIFY A;
LOAD * INLINE [
x, A, D, E
Co, a1, b1, c1
2, a2, b2, c2
3, a3, b3, c3
7, a7, b7, c7
8, a8, b8, c8
9, a9, b9, c9
];
The result will be:
See the attached file:
Ok thanks, I will try it.