Solved

SEARCH MEMO FIELD IN VFP9 SP2

Posted on 2011-02-13
2
463 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adjust TIME parameter in Visual FoxPro config file 36 178
Rewriting a VFP 9 application into a web based application 7 1,883
autofill a parameter 5 306
VFP on Windows Server 2 371
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…
Data breaches are on the rise, and companies are preparing by boosting their cybersecurity budgets. According to the Cybersecurity Market Report (http://www.cybersecurityventures.com/cybersecurity-market-report), worldwide spending on cybersecurity …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 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