>Assuming a memo field in a cursor is HUGE, and I want to look for a string: 'my string' what would be the fastest and least memory hog way of doing that? I think for sure that $ is not it... is alines() better? It won't be an exact match, in other words, I need to see if 'my string' is in there, but it may be in there as 'this is my string.' etc...
>
>I don't need to know where in the memo field it is, just whether it is there or not.
I did some testing now (I don't know how representative they are):
CLEAR
CREATE CURSOR crsTest (MyMemo M)
APPEND BLANK
REPLACE MyMemo WITH REPLICATE([A],16000000)+[ My String]
m1 = SECONDS()
AT([My String], MyMemo)
? [AT], SECONDS()-m1
m1 = SECONDS()
RAT([My String], MyMemo)
? [RAT], SECONDS()-m1
m1 = SECONDS()
aaa = [My String] $ MyMemo
? [$], SECONDS()-m1
m1 = SECONDS()
aaa = OCCURS([My String], MyMemo)
? [OCCURS], SECONDS()-m1
m1 = SECONDS()
SELECT * FROM crsTest WHERE MyMemo LIKE [%My String%] INTO CURSOR aaaa
? [SELECT +LIKE], SECONDS()-m1
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.