Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
i have the following table loaded from a qvd.
Target:
LOAD BDM,
[Branch Name],
LBDM,
TGT_YEAR,
FROM
QVD\TGT_YEAR.qvd
(qvd);
in the LBDM field, i have a list of names.
i need to replace the name Nick by Chris.
how can i do that.
any script changes?
please help me in this regard.
You can use the ApplyMap function (see help), something like this
MyMap:
mapping load * inline [From,To
'Nick','Chris'
];
Target:
LOAD BDM,
[Branch Name],
Applymap('MyMap',LBDM,LBDM) as LBDM,
TGT_YEAR,
FROM
QVD\TGT_YEAR.qvd
(qvd);
Hi,
This could easy be solved by using Applymap on the LBDM field to replace "Nick" with "Chris".
Good luck!
can u pls help me with the script?
You can use the ApplyMap function (see help), something like this
MyMap:
mapping load * inline [From,To
'Nick','Chris'
];
Target:
LOAD BDM,
[Branch Name],
Applymap('MyMap',LBDM,LBDM) as LBDM,
TGT_YEAR,
FROM
QVD\TGT_YEAR.qvd
(qvd);
Map_Name:
MAPPING LOAD * Inline
[Name, Newname
Nick, Chris];
Target:
LOAD BDM,
[Branch Name],
Applymap('Map_Name', LBDM) as LBDM,
TGT_YEAR,
FROM
QVD\TGT_YEAR.qvd
(qvd);
Hi,
If you want to replace only one name
then use if(wlidmatch(LBDM,'Nick'),'Chris',LBDM) as Ne_LBDM
else use ApplyName()
Regards