Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have 2 Tables. Table A have a Name field which contains Full Names of the employees. Table B also have Name field, but it has only Last Names. So I am trying to replace the names of table B with Table A.
I tried using if statement
Load
Name,
if(Name = '[Last Name]', [Full Name]) as Name1
its giving me error saying full name not found.
I also heard about mapping and tried to map. But not exactly sure how it will work. so I think I messed up.
Can anyone please let me know where I was going wrong or if there is any other way I can do that.
Thanks.
hi,
try this sample
TAB1:
Load * INLINE [
EMPID, FNAME ,SALRY
10, James Adam,1000
11, Andrew Symonds,2000
12, miche lmadan,3000
13, sachin Tendulkar,4000
];
TEMP:
mapping load SubField(FNAME,' ',2)as LName ,FNAME Resident TAB1;
LNAME:
load * Inline
[
EMPID,LName,SAlARY,YEAR
10,Adam,1000,2010
11,Symonds,2000,2011
12,madan,3000,2012
13,Tenduklar,4000,2013
];
FINAL:
Load *, ApplyMap('TEMP',LName) as NewFnMAe Resident LNAME;
DROP Tables TAB1;
DROP Table LNAME;
EXIT Script;
Thank you everyone.. I would post my question clearly next time. For now this mapping method Data Cleansing
worked for me.
Hi,
If you got the answer close this thread by giving Correct & Helpful answers to the posts which helps you in getting the answer.
Regards,
Jagan.