Solved

Parse string in Visual Fox Pro 6.0

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

820 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