Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I am trying to do an apply map please tell me how do I use apply map correctly.
Table1:
Load
ID,
Field2,
Field3
;
Table2:
Load
Name,
Field4,
Field5
;
I am trying to do an applymap to map the ID in Table1 to the Name in Table2.
Please suggest applymap code for the above scenario.
Thanks
so are you trying to map individual id to a name? applymap needs a mapping load of a table with two fields, first one of which should have the same values as your field in a table so QV knows what field to map with what field and based on which value.
Hello Saradhi
Here let me explain again
Now I have modified it as you told me. Please tell me how to do the applymap now.
Hello
I am trying to do an apply map please tell me how do I use apply map correctly.
Table1:
Load
ID,
Field2,
Field3
;
TableMap:
Mapping Load
Name,
New ID
;
Table2:
Load
Name,
New ID,
Field5
;
so in table 2:
load
Name,
Applymap('TableMap',Name, 'No ID or 0000') as New ID,
Field 5,
. ..
from ....
;
the third parameter is Applymap function is optional and is for instances where there is no corresponding Name value in TableMap. hope this helps.
i also noticed that you posted the same issue twice...may have been an unintended mistake...but please consolidate and do not repost.
Hello Saradhi
Here is my code for Table 1, mapping table and table2
Let me know if its correct
Table1:
Load
;
sql select * from T1;
SOBMap:
Load
NAME as ,
SET_OF_BOOKS_ID as ,
;
SQL SELECT *
FROM T2;
SOB:
Load
CHART_OF_ACCOUNTS_ID as ,
CURRENCY_CODE as ,
SHORT_NAME as ,
APPLYMAP('SOBMap',[SOB Name],[SOB ID]) as
;
SQL SELECT *
FROM T2;
Store SOB into SOB.qvd(qvd);