>I fiddled with this a few minutes and tried this:
>
>SET NEAR ON
>SEEK "1"
>
>No matter what (character) data I put in the first non-empty field, it always found it. It's not foolproof because if the "1" actually exists, it will go to that. But if you played with the values a bit, you might hit on a foolproof method.
Depending on the table's codepage, the actual candidate would be a field with all blanks and an exclamation mark in the end (chr(33)='!', and chr(32) is a space), but then there could be any other characters below space (i.e. chr(1) to chr(31)) and I'm not sure they would be treated as empty.
The only sure way I can think of is to
go top && or just Locate
count while empty(your_field_here)
and we should be on the first record where your field is not empty. If we need to do this many times, we may utilize a filtered index:
index on [your_field_here] for not empty([your_field_here]) tag notempty
and then, using that order, just Locate and there we are.