empire-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis De Brabandere <franci...@gmail.com>
Subject Re: Limit Query Results inside DBCommand
Date Sun, 29 Nov 2009 16:34:24 GMT
you might also want to implement paging, added a comment tot the issue

On Sun, Nov 29, 2009 at 1:25 PM, Rainer Döbele <doebele@esteam.de> wrote:
> Hi Amin,
>
> unfortunately I must confess that we currently don't have the ability to limit the number
of rows returned.
>
> This shows how different people work with databases.
> In my many years of database programming I have never really felt the need for it since
I always found a constraint to work with.
> I only sometimes use it for interactive queries to the database.
> But you are right, this is a thing we definitely have to add.
>
> I have created a JIRA issue for that and I will implement that ASAP.
> Unfortunately this feature is handled differently by each database.
> e.g.
> SQL Server:
> SELECT TOP 10 id, name, ...
> FROM contacts
>
> MySQL:
> SELECT id, name, ...
> FROM contacts
> LIMIT 10
>
> ORACLE:
> SELECT id, name, ...
> FROM contacts
> WHERE ROWNUM <= 10
>
> Another option is to use setMaxRows() before executing the statement.
> This looks like a better idea to me since the JDBC driver can handle it.
> Does anyone know if this is really equivalent?
>
> Rainer
>
>
> Amin Abbaspour wrote:
>> re: Limit Query Results inside DBCommand
>>
>> Hello to everyone,
>>
>> This is my first email in empire-db's users list :)
>>
>> One small question; How can I limit the number of rows returned in
>> select statements (i.e. SELECT .... LIMIT x, or SELECT TOP x ...)?
>>
>> Right now I do this manually by appending a "LIMIT x" to my query's
>> string but this is such a frequent requirement that I am pretty sure
>> this is implemented but I failed to find it.
>>
>> Regards,
>> Amin Abbaspour
>>
>>
>>
>>
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

Mime
View raw message