Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have some data that's ordered: "lastname * firstname * age".
id like to load the column so it just displays "firstname lastname".
Is this possible? Thanks!
load subfield(<column>,'*',2) & ' ' & subfield(<column>,"*',1) as newname
You can do that using string functions
left('[Name]',index('[Name]','*',2)-1) as Name
This reads up to the second space and drops the age
You can put the whole thing into a replace function if you want to drop the middle ' * '
Richard
Use this:
SubField('lastname * firstname * age' ,'*',2) & SubField('lastname * firstname * age' ,'*',1) as Name
--Jai
Load new field in the load script
Load
Name,
Right(Trim(Left(Name,index(Name,'*',2)-1)),9)&' '&Trim(Left(Name,index(Name,'*',1)-1)) as NewName
From Location;
Load *,
subfield(fieldname,'*',-2)&' '&subfield(fieldname,'*',-3) as Name
from path;