Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

joining two tables

Hi everyone,

       could you please help me with this issue.

i have two tables

table1:

ID
AB
12060
23025
41011

TABLE 2:

ID
AC
33350
53043
62126

AND I NEED THIS

IDA
BC
12060
23025
333
50
41011
530
43
621
26

THANKS!

gerardo

10 Replies
its_anandrjs

Hi,

Write script like

table1:

Load * inline

[

ID,  A,   B

1,   20,  60

2,   30,  25

4,   10,  11

];

TABLE2:

JOIN

load * inline

[

ID, A,   C

3,  33,  50

5,  30,  43

6,  21,  26

];

Put Join between two tables.

Regards,

Anand

Not applicable
Author

concatenate(table1)

LOAD *

Resident TABLE 2;

Not applicable
Author

hi Its, if i do what you wrote the load script generate $Syn tables

its_anandrjs

Hi,

You put join between them or can you publish your script for check. If you put join between them no synthetic key is created and only on table is created.

Regards,

Anand

Not applicable
Author

hI marco,

      i did it but the script generated a $syn table with %key_ID+%key_A fields

what can i do with this?

thanks

Not applicable
Author

tabella1:

LOAD* inline

[

ID, A, B

1, 20, 60

2, 30, 25

4, 10, 11

];

concatenate(tabella1)

LOAD* inline

[

ID, A, C

3, 33, 50

5, 30, 43

6, 21, 26

];

Not applicable
Author

hi! i tried with outer join and concatenate but the result was this

table1.idtable2.idabc






























but i need this:

idabc
















this is my load script

pagos:

LOAD actualizacion,

     baja,

     comentario,

     direccion,

     email,

     estado,

     estado_pago_gateway,

     fecha,

     generacion,

     id_pago,

     id_pago AS %Key_PAGO_ID,

     id_pago_dm,

     medio_pago,

     metodo_pago,

     moneda,

     monto,

     monto_neto,

     num_transaccion

FROM

(qvd);

outer join

LOAD acc_id,

     actualizacion,

     baja,

     estado_pago_gateway,

     extra_part,

     generacion,

   id_pago,

     id_pago AS %Key_PAGO_ID,

     id_pago_mp,

     item_id,

     mp_op_id,

     name,

     payment_method,

     price,

     shipping_amount,

     status,

     status_description,

     total_amount

FROM

(qvd);

what im doing wrong?

thanks!

Not applicable
Author

pagos:

LOAD actualizacion,

baja,

comentario,

direccion,

email,

estado,

estado_pago_gateway,

fecha,

generacion,

id_pago,

id_pago AS %Key_PAGO_ID,

id_pago_dm,

medio_pago,

metodo_pago,

moneda,

monto,

monto_neto,

num_transaccion

FROM

(qvd);

concatenate(pagos)

LOAD acc_id,

actualizacion,

baja,

estado_pago_gateway,

extra_part,

generacion,

id_pago,

id_pago AS %Key_PAGO_ID,

id_pago_mp,

item_id,

mp_op_id,

name,

payment_method,

price,

shipping_amount,

status,

status_description,

total_amount

FROM

(qvd);

Not applicable
Author

Hi marco,

       i tried with your script but for example i have two fields call "actualizacion", one from pago_mp and another from pago_dm.

what can i do to merge those fields?

thanks

gerardo