Solved

Parse string in Visual Fox Pro 6.0

Posted on 2011-02-21
2
586 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 41

Accepted Solution

by:
pcelba earned 500 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

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…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 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