Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find all occurrences of a name
Message
 
 
To
29/08/2002 18:42:50
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00695237
Message ID:
00695243
Views:
15
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform