2.06.2008
[ Opciones de paginacion ]
Para cuando tu BD... es una mierda...
Paginacion ver 1...
--------------------------------------------
SELECT * FROM (
SELECT *,
rownumber() OVER (--orderBy--) as ROW_NUM
FROM TABLE_NAME
--where--
)
AS a
WHERE ROW_NUM BETWEEN ? AND ?
Paginacion ver 2....
--------------------------------------------
select *
from (
SELECT UN_ALIAS.*,
( SELECT COUNT(*)
FROM TABLE_NAME DEB
WHERE DEB.FIELD_ID <= UN_ALIAS.FIELD_ID
) AS RN
FROM TABLE_NAME
) x
WHERE X.rn between 10 and 20
//Serg
Suscribirse a:
Comentarios de la entrada (Atom)
No hay comentarios.:
Publicar un comentario