iKey cData ---- ----- 1 mouse pez frame compaq 1 pez frame compaq mouse 1 frame compaq mouse pez 1 compaq mouse pez frame 2 drive compaq file xml mouse 2 compaq file xml mouse drive 2 file xml mouse drive compaq 2 xml mouse drive compaq file 2 mouse drive compaq file xml 3 frame mouse ring 3 mouse ring frame 3 ring frame mouseUser can enter "mouse AND frame" and get iKey=1 and iKey=3. This is because I SQL-Select Where cData like "mouse%" and only want top 500 rows, so I get 1,2,3. Then I SQL-Select Where cData like %frame% and get iKey 1,3. Then I SQL-Select for cData="frame%" and get 1,3. Then I SQL-Select Where cData like %mouse% and get 1,3. I do a last SQL-Select and group by iKey and just get back 1 row per iKey value and get 1,3. It doesn't make that much difference in this example, but I think when there are a large number of words per cData value and a lot of words entered in the search phrase, this methodology always works.
iKey cData ---- ----- 1 mouse pez frame compaq 1 pez frame compaq 1 frame compaq 1 compaq 2 drive compaq file xml mouse 2 compaq file xml mouse 2 file xml mouse 2 xml mouse 2 mouse 3 frame mouse ring 3 mouse ring 3 mouseUser can enter "mouse AND frame" and get iKey=1 and iKey=3, same behavior as above. But if user enters "frame AND mouse"... Hey, I suppose your way of dropping off cData words will work.... Since VFP char columns are always fixed length, it would not change the size of the table itself, but maybe it would change the size of the index. I'll have to test that out.