|
Posted by Russ Rose on 02/25/07 02:57
SELECT TOP 15 firstname, lastname
FROM TableX
WHERE lastname >= 'Samson'
ORDER BY lastname
<michealp@gmail.com> wrote in message
news:1172369332.241646.91450@z35g2000cwz.googlegroups.com...
>I have a directory of user information. What I would like to do is
> allow someone to search for person X and then return not only the
> information for person X, but also the information for the next 15
> people following person X sorted alphabetically by lastname.
>
> So if someone searched for the lastname = "Samson", it would return:
>
> Samson, John
> Saxton, Greg
> Scott, Heather
> Sears, Rebecca
> ... (15 names following "Samson) ...
>
>
> How do you in SQL return a record set of X records starting at
> particular record (e.g. lastname = "Smith)?
>
> Thanks in advance.
>
Navigation:
[Reply to this message]
|