Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
>How do you prevent a scan from skipping records
>If I have a table with an index on a character
>field 'cfield'. During the scan I update the
>cfield, with the index on of course, this changes
>the postion of the record in the table. The scan goes
>to the next record, but the next record has changed
>because the cfield was updated. Does this make sense? lol.
>How do you stop this from happening.
Don't do that. If you're scanning in index order, don't change the value of the index key. In most cases, the order of a scan doesn't matter much, so just SET ORDER TO before the SCAN.
Also, are you sure you even need SCAN? Could you do whatever it is with a single command?
Tamar
Précédent
Suivant
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