Re: Getting next records



>>Assuming you where using the Employees table from the Northwind sample database
>>
>>Select Top 50 *
>>from Employees
>>where [EmployeeId] >
>>(Select Max(employeeID) from (Select top 50 [EmployeeId] from employees))
>>--
>>Brian Bushay (TeamB)
>>Bbushay@xxxxxxxxx
>
>In fact, table key has 2 fields. Using your example, we would have EmployeeID and DeptID. I tried to adapt your example to include the second field but I really was not able to do it.
>
>Please, can you help me again rewriting your command with a second field in the key?

Something like

Select Top 50 *
from Employees
where [key2]+[key2] >
Select (Max([key1]+[key2]) from (Select top 50 [key1],[key2] from employees))


--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.