?
Solved

SEARCH MEMO FIELD IN VFP9 SP2

Posted on 2011-02-13
2
Medium Priority
?
486 Views
Last Modified: 2012-05-11
Hi Experts
I would like to copy records to a file that has certain item values in a memo field using

Select * from MYtable where (memo field (mem_prod) has 20/5/2010 in it  ) into a table or cursor

Thanks
0
Comment
Question by:b001
[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 1000 total points
ID: 34883837
Test for substring in the memo field should be slow but we have no faster possibility:

SELECT * FROM MYtable WHERE "20/5/2010" $ mem_prod INTO TABLE NewTableName

The "20/5/2010" string is tested for exact match, so it should not contain spaces or different separators.
0
 
LVL 12

Assisted Solution

by:jrbbldr
jrbbldr earned 1000 total points
ID: 34888127
Pavel's advice is on the mark.

The only thing that I might add would be that you should possibly add other possibilities for the way a date might be entered into a Memo field.  

This would only be necessary if the input were from individuals manually entering the memo field content.
But if that were the case you might also add:

SELECT * ;
   FROM MYtable ;
  WHERE "20/5/2010" $ mem_prod ;
  OR "20/5/10" $ mem_prod
  INTO TABLE NewTableName

NOTE - Perhaps you are entering your Date as DD/MM/YYYY in some manner and, if so, ignore this.   But if you are using the more standardized  MM/DD/YYYY, the sample you gave above for the Date searched for might need a look-over.

Good Luck
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses

771 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