Solved

SEARCH MEMO FIELD IN VFP9 SP2

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Foxpro, Word 2003 Automation and Windows 7 10 876
Report to PDF and TIF 31 784
diarydate calendar in vfp retrun data to form 7 417
Can't edit config.fpw in VFP9 5 56
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 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

912 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

20 Experts available now in Live!

Get 1:1 Help Now