Parse string in Visual Fox Pro 6.0

Hello Experts,

I need to parse the LEFT & RIGHT string , which is being separated by comma.

Name
-------------
JOHN,SMITH


When I tried LEFT(Last_Name  , AT(",", Name)-1) I get JOHN. How can split other half i.e right of the string????
ASPDEVAsked:
Who is Participating?
 
pcelbaConnect With a Mentor Commented:
SUBSTR(Last_name, AT(",", Last_name)+1)  

should give you SMITH. Remove possible spaces by ALLTRIM:

ALLTRIM(SUBSTR(Last_name, AT(",", Last_name)+1))

0
 
ASPDEVAuthor Commented:
It Worked!

Thanks.
0
All Courses

From novice to tech pro — start learning today.