Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a column which stores the email info, can anyone suggest me how do i split into username, @, email address example...
abc@gmail.com, should be splitted as abc, @ , gmail.com into 3 different columns...
Hi Savitha,
you can use subfield():
LOAD
subfield(email,'@',1) as user,
if(index(email,'@')>0, '@') as at,
subfield(email,'@',2) as domain
...
- Ralf
Use the SubField function
=Subfield('abc@gmail.com','@',1) gives you the first field 'abc'
=subfield('abc@gmail.com','@',2) gives you 'gmail.com'
Try something like:
Load
SubField(Address, '@' , 1) as Name,
SubField(Address, '@', 2) as MailProvider,
'@' as At
Hi Savitha,
you can use subfield():
LOAD
subfield(email,'@',1) as user,
if(index(email,'@')>0, '@') as at,
subfield(email,'@',2) as domain
...
- Ralf
Use subfield function like
SubField('abc@gmail.com','@',1) as UserName
SubField('abc@gmail.com','@',2) as DName
'@' as Atrate
Hope this helps
Thanks & Regards
thanks but i need only the distinct values
LOAD DISTINCT... ?