Solved

SEARCH MEMO FIELD IN VFP9 SP2

Posted on 2011-02-13
2
444 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
2 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 250 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 250 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now