Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jez Enefer-Mills
  Where is Jez Enefer-Mills?
 Cornwall
 United Kingdom
 Jez Enefer-Mills
 To: Robin George
  Where is Robin George?
 Dammam
 Saudi Arabia
 Robin George
 Tags
Subject: RE: To Retrieve Specific Record from Foxpro DBF...
Thread ID: 34017 Message ID: 34189 # Views: 1 # Ratings: 0
Version: FoxPro 2.x for MSDOS Category: Databases, Tables and SQL Server
Date: Wednesday, December 10, 2003 11:14:27 AM         
   


> Thank You Stuart Rosen & Eric den Doop.The 'left' fuction is serving my purpose.
> But what if the letter I want to search is in between (ie not at the beginning)


You can try this ....

substr(fieldname,x,y)="??"

&& Where x = start position
&& Where y = number of characters
&& Where ?? = what you want to search for

i.e. substr(fieldname,4,2)="he" && where field contents = "wRDhe456"
This will search the contents of your fieldname for "he" starting at position 4 for 2 characters

or you could use this

"he"$fieldname

this will search for the string "he" in the contents of 'fieldname'



Jez

ENTIRE THREAD

To Retrieve Specific Record from Foxpro DBF FILE Posted by Robin George @ 12/6/2003 2:08:30 PM
RE: To Retrieve Specific Record from Foxpro DBF... Posted by Eric den Doop @ 12/6/2003 3:06:40 PM
RE: To Retrieve Specific Record from Foxpro DBF... Posted by Stuart Rosen @ 12/7/2003 10:29:25 PM
RE: To Retrieve Specific Record from Foxpro DBF... Posted by Robin George @ 12/10/2003 11:01:38 AM
RE: To Retrieve Specific Record from Foxpro DBF... Posted by Jez Enefer-Mills @ 12/10/2003 11:14:27 AM
RE: To Retrieve Specific Record from Foxpro DBF... Posted by Eric den Doop @ 12/10/2003 11:42:28 AM