Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
Please help me.. This is urgent for me...
I have a feild having values like below:-
Name
shamly.gmail.com
abc_shamly.gmail.com
kevin.gmail.com
abc_george.gmail.com
abc_def_shamly.gmail.com
abc_shamly
shamly
kevin
george
I need only the nams from all the feilds. Some name entries are there as default(kevin, shamly, george). I need those as such and shamy from other entries which has '_ 'and '.' . So I used TextBetween function. But it is not giving me for all. Please help me to get only NAME from all the given possibilities of name entries.
I tried this trim(UPPER(subfield(Name,'.',1)))
I tried this also UPPER(TextBetween(NAME, '_', '.',1))
Please help me quickly friends... this is vey important for me today
Message was edited by: Shamly P.T
Hi,
Use WildMatch function to get this done. Something like below,
If(WildMatch(Name, '*shamly*'), 'Shamly')
Load
If(WildMatch(Name, '*shamly*'), 'SHAMLY') as Name
Hi Satyadev,
Sorry to notify late. Shamly is not a unique entry. It can have any number of different names like below
shamly.gmail.com
abc_kevin.gmail.com
abc_shamly.gmail.com
abc_def_george.gmail.com
abc_shamly
shamly
kevin
George
How to get only the names…?????
Regards,
Shamly P T
Program Transformation Office
• Mobile: +91 - 8088266881
• Email: shamly.t95@wipro.com<mailto:shamly.t95@wipro.com>
“Whatever the mind can conceive and believe,it can achieve”
Hi Satyadev,
Sorry to notify late. Shamly is not a unique entry. It can have any number of different names like below
shamly.gmail.com
abc_kevin.gmail.com
abc_shamly.gmail.com
abc_def_george.gmail.com
abc_shamly
shamly
kevin
George
How to get only the names…?????
Regards,
Shamly P T
Program Transformation Office
• Mobile: +91 - 8088266881
• Email: shamly.t95@wipro.com<mailto:shamly.t95@wipro.com>
“Whatever the mind can conceive and believe,it can achieve”
Hi Shamly
Use this Script:
AAA:
Load *, Subfield(Name,'.',1) AS NewName Inline [
Name
shamly.gmail.com
abc_kevin.gmail.com
abc_shamly.gmail.com
abc_def_george.gmail.com
abc_shamly
shamly
kevin
George
];
BBB:
Load *,
if(len(Subfield(NewName,'_',3))>3,Subfield(NewName,'_',3),
if(len(Subfield(NewName,'_',2))>3,Subfield(NewName,'_',2),
if(len(Subfield(NewName,'_',1))>3,Subfield(NewName,'_',1),NewName))) AS LatestName
Resident AAA;
DROP Table AAA;
Hop that helps.
See the Attachment.
This works:
Load Name,
TextBetween('_'&Name&'.', '_','.',If(SubStringCount(Name,'_')=0,1,SubStringCount(Name,'_')+1)) as NewNames;
Load * Inline [
Name
shamly.gmail.com
abc_kevin.gmail.com
abc_shamly.gmail.com
abc_def_george.gmail.com
abc_shamly
shamly
kevin
George]
Hi Shamly,
Try below,
SubField(SubField(Name, '.', 1), '_', SubStringCount(Name, '_')+1) as NewName
could you please specify the pattern you are following
like
ex: something_emailid_something_somename
another one:
tabNames:
LOAD Name, SubField(NameNew, '_', SubStringCount(NameNew, '_')+1) as NameNew;
LOAD Name, SubField(Name, '.', 1) as NameNew
Inline [
Name
shamly.gmail.com
abc_shamly.gmail.com
kevin.gmail.com
abc_george.gmail.com
abc_def_shamly.gmail.com
abc_shamly
shamly
kevin
george
];
hope this helps
regards
Marco