Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A string search??

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I would like to do a search for a given Social Security Number. And the second search would be the persons birthdate as dd/mm/yyyy. Thank you.

Juandiegomcc@yahoo.com
 
1. Use Locate For command is the two fields are not indexed.
2. use Seek() if the two fields are in the index.
3. Use SQL with Where Clause doing the qualifying.

Troy
San Francisco
 
To fetch the record having either a Security number or a date of birth from a file ...

USE (with index suitanly) or Select Myfile

LOCATE FOR mySecurityNumber = SocialSecurityNumber .OR. ;
myDateOfBirth = InRecordDateOfBirth
display as per your choice form

ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
assuming you as indexes on ssan and birthdate

Use (table) order ssan alias ssan again in 0
use (table) order birthdate alias bd again in 0

do case
case seek(SSAN , "SSAN")
= UDF()
case seek(BIRTHDATE , "BD")
=UDF()
endcase


Procedure UDF
do stuff




David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top