field in acces split into two fields by using space

I have an Access database that has first name and last name in the same field

Field1
Sally Jensen
I want them to split into two in a queyr

Field1              Field2
Sally               Jensen
PdetersAsked:
Who is Participating?
 
hieloConnect With a Mentor Commented:
try:
SELECT Left([Field],Instr([Field]," ")) as [first], Mid([Field], Instr([Field]," "), Len([Field]) ) as [last] FROM Table

Open in new window

0
 
SheilsCommented:
try

select Trim(Left(Name, SpacePosition - 1)) as FirstName, Trim(Mid(Name, SpacePosition + 1)) as LastName
from tableName


0
 
hieloCommented:
glad to help
0
All Courses

From novice to tech pro — start learning today.