Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
<>
Thanks folks. I am not looking for "physical adjacency". Suppose the source table has no particular source order and is a contact database like Outlook; name, address, phone etc. The definition of next and previous is based on an alpha sort on the name field. So I know the target record is where
keyID = myVar.
I want to obtain the KeyID for the records before and after the target WHEN the table is alpha sorted. Naomi's idea may work, I haven't tried it yet but I will. A simple SKIP and SKIP -1 won't work in this instance because the SELECT is being executed from a web page via ASP and the usual VFP commands are not readily available. That's why I wanted to do it all in a single SELECT statement.
Thanks again.
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