Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts ,
I have EMAIL ID field but it contain two email id's in one row so i want to pick only first email id which is preceding of '/' and ','.So how can i use sub field function for both.I have attached my sample qvw.(How can i use subfield function multiple times for single column)
Example
EMAIL ID Expected OUTPUT
smartrituenterprise@gmail.com/sumanroy@hotmail.com (smartrituenterprise@gmail.com)
sam8698370@gmail.com,org2004@yahoo.co.in (sam8698370@gmail.com)
Thanks in advance
Regards,
RUP
Here you go...
A:
LOAD SubField(SubField(EMAILID&'/', '/', 1)&',', ',', 1) as NewEMAILID,
EMAILID;
Load * Inline
[
EMAILID
sd8698370@gmail.com,org2454@yahoo.co.in
a_shivekar@yahoo.co.in,datta.shivekar@ethoswatches
haraakirankaur415@gmail.com,SUKHWANT.SINGH@INDIA.COM
malikbj2055@yahoo.com,malikbj2055@gmail.com
nandkishorsable@hotmail.com,rekhansable@gmail.com
NUNU.ANGEL@GMAIL.COM, ANU14096@GMAIL.COM
emmanuel2427@gmail.com/emmanuelbijapurkar@gmail.co
mysticalimpressions@gmail.com/sabornee.karmakar@gm
smartrituenterprise@gmail.com/sumanroy@hotmail.com
] (delimiter is |);
A:
Load * Inline
[
EMAILID
sd8698370@gmail.com,org2454@yahoo.co.in
a_shivekar@yahoo.co.in,datta.shivekar@ethoswatches
haraakirankaur415@gmail.com,SUKHWANT.SINGH@INDIA.COM
malikbj2055@yahoo.com,malikbj2055@gmail.com
nandkishorsable@hotmail.com,rekhansable@gmail.com
NUNU.ANGEL@GMAIL.COM, ANU14096@GMAIL.COM
emmanuel2427@gmail.com/emmanuelbijapurkar@gmail.co
mysticalimpressions@gmail.com/sabornee.karmakar@gm
smartrituenterprise@gmail.com/sumanroy@hotmail.com
];
NoConcatenate
B:
Load
subfield(replace(EMAILID,',','/'),'/',1) as EmailID
Resident A;
DROP Table A;
=if(index(EMAILID,'/') > 0,SubField(EMAILID,'/',1),SubField(EMAILID,',',1))
Hi,
another solution for multiple possible email delimiters might be:
A:
Load *,
Left(EMAILID,FindOneOf(EMAILID&',','/, ;')-1) as FIRSTEMAILID
INLINE [
EMAILID
"sd8698370@gmail.com,org2454@yahoo.co.in"
"a_shivekar@yahoo.co.in,datta.shivekar@ethoswatches"
"haraakirankaur415@gmail.com,SUKHWANT.SINGH@INDIA.COM"
"malikbj2055@yahoo.com,malikbj2055@gmail.com"
"nandkishorsable@hotmail.com,rekhansable@gmail.com"
"NUNU.ANGEL@GMAIL.COM, ANU14096@GMAIL.COM"
emmanuel2427@gmail.com/emmanuelbijapurkar@gmail.co
mysticalimpressions@gmail.com/sabornee.karmakar@gm
smartrituenterprise@gmail.com/sumanroy@hotmail.com
10johndoe@gmail.com 11janedoe@gmail.com
12johnsmith@gmail.com;13janesmith@gmail.com
];
hope this helps
regards
Marco
please close your open threads if your questions are answered:
Qlik Community Tip: Marking Replies as Correct or Helpful
thanks
regards
Marco
Another Solution may be
A:
Load
Subfield(Replace(EMAILID,'/',','),',',1) as NewEMAILID,
EMAILID;
Load * Inline
[
EMAILID
sd8698370@gmail.com,org2454@yahoo.co.in
a_shivekar@yahoo.co.in,datta.shivekar@ethoswatches
haraakirankaur415@gmail.com,SUKHWANT.SINGH@INDIA.COM
malikbj2055@yahoo.com,malikbj2055@gmail.com
nandkishorsable@hotmail.com,rekhansable@gmail.com
NUNU.ANGEL@GMAIL.COM, ANU14096@GMAIL.COM
emmanuel2427@gmail.com/emmanuelbijapurkar@gmail.co
mysticalimpressions@gmail.com/sabornee.karmakar@gm
smartrituenterprise@gmail.com/sumanroy@hotmail.com
];