Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL filters
Message
From
14/12/2005 17:52:09
 
 
To
14/12/2005 17:49:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01078076
Message ID:
01078077
Views:
19
>If I set a filter as in:
>
>set filter to loc_id = 'A-21'
>browse
>
>the result will correctly show one record.
>But if I issue:
>
>set exact on
>set filter to loc_id = 'A-21'
>filterstr = filter()
>select * where &filterstr
>
>the result returns A-21, A-219, A-216, A-213 etc. Which is not what we want.
>
>This can be overcome by setting the initial filter as:
>set filter to loc_id == 'A-21'
>
>but this construct is difficult in my situation. Is there another solution?
>
>Thanks
lcPaddedA = PADR('A-21',LEN(loc_id))
set filter to loc_id == lcPaddedA
BROWSE NORMAL
select * where loc_id == lcPaddedA INTO CURES crsFiltered
SELECT crsFiltered
BROWSE NORMAL
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform