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
.



Relevant Pages

  • Re: MaxRecords
    ... >> I tested this using the Northwind database and Employees table ... >> MaxRecords I had no problem getting MaxRecords to work. ... >> Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: Getting next records
    ... Brian Bushay TeamB wrote: ... >Assuming you where using the Employees table from the Northwind sample database ... I tried to adapt your example to include the second field but I really was not able to do it. ...
    (borland.public.delphi.database.ado)
  • Re: Opinion on CRC-32
    ... Craig Stuntz [TeamB] wrote: ... >>One thing I noticed using these is that they generate a 32 character ... >>these when adding new employees to the system. ...
    (borland.public.delphi.language.objectpascal)
  • Re: DevCo spinoff to employees
    ... Unless the private equity firm (which is what the buyer is described ... as) is owned by the employees, ... Dave Nottage [TeamB] ...
    (borland.public.delphi.non-technical)
  • Re: Delphi is dying? Finally, unfortunately
    ... Then you're not listening to the employees. ... saying they are not changing direction. ... Dave Nottage [TeamB] ...
    (borland.public.delphi.non-technical)