Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Parse string in Visual Fox Pro 6.0

Posted on 2011-02-21
2
Medium Priority
?
615 Views
Last Modified: 2012-05-11
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????
0
Comment
Question by:ASPDEV
2 Comments
 
LVL 43

Accepted Solution

by:
pcelba earned 2000 total points
ID: 34946460
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
 

Author Closing Comment

by:ASPDEV
ID: 34946530
It Worked!

Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question