Solved

Parse string in Visual Fox Pro 6.0

Posted on 2011-02-21
2
603 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 42

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

729 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