Jump to content

select chars in a name field, but stop at comma


mrherman

Recommended Posts

Hi

 

In a SELECT statement, I need to fetch a last name from a field up to but not including the comma, if there is one in the field.  The field I need to select from is 13 chars wide, and is in the following format:

 

Johnson, John
Smith, Suzy
Valadovichici
Marks, Markie

 

So, some last names take up the entire 13-char field.  What I need from the above is:

 

Johnson
Smith
Valadovichici
Marks

 

Thanks for any help.


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.