For oracle you can write ( something like this )
select *
from (
select rownum as rnum ,
g.good ,
g.namerus ,
cnt.count
from servers.goods g ,
( select count(*) as count
from servers.goods g1
) cnt
where rownum <= #lastnum#
)
where rnum > #firstnum#
Read sql reference from your sql vendor.
Ps ( it's not ibatis forum question ).
-----Original Message-----
From: Odelya YomTov [mailto:[email protected]]
Sent: Wednesday, July 22, 2009 11:56 PM
To: [email protected]
Subject: RE: size of paginated list
Right
But I prefer not to call 2 different queries.. can I do it in one query?
-----Original Message-----
From: Andrey Rogov [mailto:[email protected]]
Sent: Wednesday, July 22, 2009 9:44 PM
To: [email protected]
Subject: RE: size of paginated list
select count(*)
From your_table
<dynamic>
Your expression
</dynamic>
Before select.
-----Original Message-----
From: Odelya YomTov [mailto:[email protected]]
Sent: Wednesday, July 22, 2009 11:17 PM
To: [email protected]
Subject: size of paginated list
Hi!
I need to know the size of the paginated list (not per page).
Because if I do:
orderList.getPageSize - I get the amount of records per page, and I need to
know in general how many records are there in the database.
For example:
If my page size is 10, and the query should return 15, it should tell me 15
and not 10.
How can I do it?
Thanks|!
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
****************************************************************************
********
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
****************************************************************************
********
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]