General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
<>
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.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only