Isolating Characters Left of Comma

A

Anthony

I have a database where both Last Name and First Name are
combined in a single field. ie, Jones, Laura. For
comparison purposes I need to compare only the last name
within this field to another table.field that is only the
last name. Length of last name and position of comma vary
from record to record so MID and Left commands don't seem
to work.

Is there a command that will allow me to isolate only the
characters that exist left of the comma?
 
R

RobFMS

As long as the data is in a consistent format (i.e. LastName, FirstName),
you can use the Split() function (in Access 2000 & higher). Use the comma as
the delimiter. The help file will give you the syntax.

HTH

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 

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