sql search
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Apr 20 14:53:21 CDT 2006
On 4/20/06 2:40 PM, "jda" <jda at his.com> wrote:
>>>> select * from tableA where id > (select count(*) - 15 from tableA )
>>>>
>>>> But it could be expensive query.
>>>>
>>>> Probably this task can be redesigned in someway?
>>>> If no - put the feature request to the mantis please.
>>>>
>>>
>>> Hi Ivan,
>>>
>>> This works great. Thanks!
>>
>> This will work if you not delete records never
>> Do you ?
>>
>
> Hi Ruslan,
>
> Yes, I do. But when that happens I update the 'id' field so that
> there are no gaps (I don't use RecID). So the sql search above will
> always work with my databases.
But Ivan use not ID but count(*)
If you update ID ... (Hey! You make ORDERED LISTs, right? :)
Then may be more correct to use something as
select *
from tableA
where id > (select max(id) - 15 from tableA )
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina-beta
mailing list