[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: substring



Sure Maria
First Unstring the Name by ',' to get the last name
and then use substring on the last name.
 unstring $name by ',' into $lastname $firstname
 substr($lastname,1,6)

regards
Geetha

--- "Cadenas, Maria (MT)" <MCadenas@DOW.COM> wrote:
> we need to select the first six letters of a last
> name for each employee,
> however, the format for the field is:
> Last, First Middle (i.e. Lee, James G)
>
> Is there a way to make sure we substring only the
> first six letters of ONLY
> the last name? so that if the last name is three
> digits (i.e Lee) we ONLY
> get Lee and NOT Lee, J?
>
> Any advice is appreciated.


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/