Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have Source table, something like below
(has to be done in QlikView)
I have to insert a new row from Table1 to table2 as (a zz 10 3.45 34.5)
the last 3 coloums is from table 1 for c1=a
Hi Geetha N,
Im not sure if I understand you. You want the last row of table 1 added to table 2?
CONCATENATE (table2) LOAD
C1,
C2
RESIDENT table1;
but I don't know how you want 10, 3.45 and 34.5 to be linked. As far as I understand that are the values linked to table1.C1 = a.
So maybe start the script as follows:
LEFT JOIN (table1) LOAD
C1,
// C2, // Not used because zz isn't a value in table 2
C3,
C4,
C5
RESIDENT table2;
Then use the earlier posted script
CONCATENATE (table2) LOAD
C1,
C2,
C3,
C4,
C5
RESIDENT table1;
DROP FIELDS
C3,
C4,
C5
FROM TABLE table1;
Hi Geetha N,
Im not sure if I understand you. You want the last row of table 1 added to table 2?
CONCATENATE (table2) LOAD
C1,
C2
RESIDENT table1;
but I don't know how you want 10, 3.45 and 34.5 to be linked. As far as I understand that are the values linked to table1.C1 = a.
So maybe start the script as follows:
LEFT JOIN (table1) LOAD
C1,
// C2, // Not used because zz isn't a value in table 2
C3,
C4,
C5
RESIDENT table2;
Then use the earlier posted script
CONCATENATE (table2) LOAD
C1,
C2,
C3,
C4,
C5
RESIDENT table1;
DROP FIELDS
C3,
C4,
C5
FROM TABLE table1;
Hi avkeep01
Sorry for the bad explanation...
(When I applied this the new values are coming 2 times)
The table1 data will be extending, the C1 value will be constant and C2 values will be added(At a time It might add N number of rows). If any Value to table1 is added that has to be reflected in Table2 also. That is the main changes has to be done. But the values to Table2(C3, C4, C5) has to be taken by comparing the C1 value.