Selecting the next/previous record based on a sort order

Pierre

Quote
> select min(Surname + FirstName) from Clients where
>   Surname + FirstName > 'SMITHJOHN'

Is that really what you want?  What if the names included:

John Steven
Johns Onyx
Johnson George
Johnson Zeke

In the concat above, the sequence would be:

JOHNSONGEORGE
JOHNSONYX
JOHNSONZEKE
JOHNSTEVEN

In any event, forcing an index seek is difficult because the target is
unknown.  Do you normally search by name?  Did you try clustering, with name
as the left most columns on the clustering index?

Joe