Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String into string
Message
From
17/07/2010 00:52:56
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01472769
Message ID:
01472773
Views:
73
>I have a table that contains names of employees, for example the field is called a name and contains " Jhon Smith McCartney " I need to find those which name is Smith and to leave them in another table how can I do it? I need to find a str inside a str and to leave the records in another table

You can use the "$" ("contained in") operator:
SELECT ;
  EmployeeName ;
  FROM Employees ;
  WHERE "Smith" $ EmployeeName ;
  INTO TABLE Results
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform