Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excluding first word in a field.

Status
Not open for further replies.

product26

IS-IT--Management
Sep 27, 2007
26
US
I need to exclude the first word in a field. Our database does not have individual fields for first and last name, we simply have "{customer.custname}". (this is because we service businesses as well as individuals, but we need to be able to search for them from the same field)

I have "{customer.custname}[1]" to get the first initial. But how do I skip the first name, and display everything after the first word?
 
Use a formula like this:

stringvar array x := split({customer.custname}," ");
if ubound(x) > 1 then
x[2] else
{customer.custname}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top