You can use LIKE SQL operator.
select number,last_name,first_name,location,status ;
from refdocswithaddress into cursor refdoclist nofilter ;
where UPPER(refdocswithaddress.last_name) LIKE (ALLTRIM(mreflast_name) + "%")
>Hi all:
>
>I have the following code in the click event of the Find button.
>
>
select number,last_name,first_name,location,status ;
> from refdocswithaddress into cursor refdoclist nofilter ;
> where UPPER(refdocswithaddress.last_name) = mreflast_name
>
>Problem: This statement only gets me the first occurence of the name, while I would like for all similar names to be shown in the resulting cursor.
>
>Example: If mRefLast_name = "BROWN" the select statement looks for the first occurrence of BROWN and displays it in the cursor. On the other hand, if there is another name "BROWNE" (even if it the the next row to that of "BROWN", then nothing is selected in displayed in the cursor (0 records in cursor).
>
>What am I doing wrong here? Thank you in advance:)
--sb--