[AccessD] Splitting Information from One field into Two

Jim Hewson JHewson at karta.com
Tue Sep 28 11:35:18 CDT 2004


Amanda
Where Name is the field for the full name.
I used a Make Table query.

Try this:

SELECT tblFullName.Name, Left([Name],InStr([Name],",")-1) AS LastName, Right([Name],Len([Name])-(InStr([Name],",")+1)) AS FirstName INTO tblSplitName
FROM tblFullName;

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Amanda
Rittenhouse
Sent: Tuesday, September 28, 2004 11:08 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Splitting Information from One field into Two


I can't find my sample code where I update two fields by splitting one.  I have a field NAME which contains: 
last name      comma     first name        Example:  Smith, John
I want to create two fields:  LastName     FirstName
I want to populate the two fields with the data from NAME.  Before the comma is the last name and after the comma is the first name.  I've seen the update code to do it but can not locate it now.  Please help.

* Amanda

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list