Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
The help for VFP6SP3 clearly states that "SELECT does not respect the current filter condition specified with SET FILTER". The same is true for SET KEY, SET ORDER, SET INDEX and so on. Temporary Indexes can be generated on the fly to satisfy the SQL request. If you want to filter the result set, use the WHERE clause. That's why a SELECT from a single table with a where clause may require the NOFILTER keyword if you want something more than merely a filter on the original table.
>I limited a table to a few records by using SET KEY TO. I then did a SQL select on the table with no WHERE clause restricting the select statement because I assumed that the select would respect the SET KEY TO command. To my surprise, I got a cursor based on the whole table. Nevertheless, the table still obeyed the the SET FILTER TO when browsing and using navigational commands.
>
>This was in FWP2.6 and I tried the same thing in VFP6 SP3 and got the same result. My immediate response was to limit the select statement to the same criteria that SET KEY TO used.
>
>Question. I assumed that *all* commands respected SET KEY TO, SET FILTER TO etc. Seemingly SQL-Select doesn't. Is this correct? Why is there a difference between Fox's own SQL-Select statement and it's own navigation type commands in it's respect of SET KEY TO, SET FILTER TO ?
>
>This obviously isn't a problem. I was just surprised at the result using SQL-Select.
>
>Any advice much appreciated.
>
>TIA
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement