Splitting data from one filed into 2 fields.

G

Guest

I know how to concatinate from 2 fields into 1, but is there a way to
reverse this? For expample I would like to spit my names field into a First
Name filed and a last name field. Is there a way to do this?

Example
Field is
Customer Name
John Smith (would like to see if it can be change into)
Fname John; Lname Smith
Thanks,
Tara
 
G

Guest

There is a way, but it is not clean unless you have a unique delimiter
between the first and last name. I.E. the scenerio where the last name it
two words such as Van Buren or a first name that is really two names such as
Billy Joe.

This is a quick way to do it but does not take into account the scenerios
above.

x = "John Smith"
y = left(x,instr(x," "))
?y
John
z = right(x,len(x)-instr(x," "))
?z
Smith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top