?
Solved

field in acces split into two fields by using space

Posted on 2008-10-23
3
Medium Priority
?
172 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:Pdeters
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 2000 total points
ID: 22791038
try:
SELECT Left([Field],Instr([Field]," ")) as [first], Mid([Field], Instr([Field]," "), Len([Field]) ) as [last] FROM Table

Open in new window

0
 
LVL 16

Expert Comment

by:Sheils
ID: 22791041
try

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


0
 
LVL 82

Expert Comment

by:hielo
ID: 22796106
glad to help
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question