Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello viewers.
I have a mapping table(.xls)&master table(.qvd) it contains
mapping:
com_name, code
ihp, 001
ics, 002
itech, 003
icl, 004
master:
ouname, f2, f3, f4, f5
ihp,
ics,
itech,
icl,
ghp,
gcs,
gtech,
gcl
Now my requirement is
to compare mapping table with master table
If any new record is found then it will automatically load into mapping table
My script looks like
In master I have renamed ouname as com_name
mapping:
Load
companyname,
code
from<>;
concatenate
load
com_name
resident master
where not exists(com_name);
But it is not showing desired output.
My desired output should be like this
com_name, code
ihp, 001
ics, 002
itech, 003
icl, 004
ghp
gcs
gtech
gcl
any Help will be appreciated.
Hi,
Try to keep same field name (com_name) on both table and your script should be ok.
mapping:
load * Inline [
com_name, code
ihp, 001
ics, 002
itech, 003
icl, 004 ];
Concatenate(mapping)
//master:
load * Inline [
com_name, f2, f3, f4, f5
ihp,
ics,
itech,
icl,
ghp,
gcs,
gtech,
gcl
] where not Exists(com_name);
That is working fine
But in the existing table we have field name as ouname and In other table field name com_name
I don't have permissions to modify the existing data.
In application, I have renamed ouname as com_name
In this case how to accomplish this???
Hi
may be try like this
T1:
LOAD ouname as com_name,
f2,
f3,
f4,
f5
FROM
(ooxml, embedded labels, table is Sheet3) ;
T2:
LOAD com_name,
code
FROM
(ooxml, embedded labels, table is Sheet2)where Exists(com_name);
Mention both actual name and alias name. Ex: Where not exists(com_name, ouname)
Also, ensure that the field name is same in both tables.