Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, i need to know how to the following thing:
Table A
Key A
Field A
Field B
Table B
Key B
Field C
Field D
I need to have a Table C Having the Key of both A and B Tables! Is there any simply method to do this?
Table C
Key A
Key B
Field E
Field F
Thanks
Marco
we have many ways to do this:
*concatenation
*join
*applymap
etc
based on the data we can decided
simple way would be
Table A
Key A
Field A
Field B
Table B
Key B
Field C
Field D
Table C
LOAD
key C as Key
from
tabel C
Load
Key A as Key
resident
Table A
Load
Key B as Key
resident
Table B
May be linked table is what you need. Check this blog post: Concatenate vs Link Table
So if Table C must be composed by all its fields plus all the keys needed how can i do by code?
Table C
A
B
C
D
....
N
..
Key A as Key, (from table A)
Key B as Key (from table B)
Thanks
Marco
You may use a linked table as Tresesco mentioned. Just make sure that you create a key on the dimensions itself and then join it to the Linked table you have created
I have tried also with this statement in order to create a linked table but it is not properly working.
LINK_TABLE:
LOAD NURELAZ AS "NURELAZ" FROM $(QVD_PATH)\SVGES108.QVD (qvd);
LOAD NURELAZ &'#'& PRGMOV AS "KEY" FROM $(QVD_PATH)\SVGES116.QVD (qvd);
Thanks
Hi Marco,
Importing the keys will not help, since they need a link with the underlying data in table C. Can you reconstruct the 2 keys with the data you'll load in C? This would be the simplest.
Else you need to identify a common field between table A/B and table C, and work with a mapping solution.
Regards,
Johan
Yes but i need the table A and Table B.
Thanks
Marco
A:
LOAD
X,
Y,
Z
FROM
xx.QVD (qvd);
LEFT JOIN
LOAD
NURELAZ &'#'& PRGMOV AS "KEY"
FROM
yy.QVD (qvd);
It would create a table A with all of its field with the KEY element isn't it?
When i run it it works but the application pause always, can you help me?
Thanks
Marco