Ver Mensaje Individual
  #19 (permalink)  
Antiguo 22/12/2009, 04:16
Gallote
 
Fecha de Ingreso: diciembre-2009
Ubicación: Santa Fe
Mensajes: 6
Antigüedad: 14 años, 4 meses
Puntos: 0
Respuesta: Ayuda para hacer paginacion

Creo que este sería tu SQL

Cita:
SELECT * FROM (SELECT row_number() OVER (ORDER BY fec_ing) AS rownum, res_id, cli_nom, cli_apepat, ciu_des, hab_num, tip_des, fec_ing from cliente, treserva, thabitacion, ttipo_habitacion, tciudad where
((cliente.cli_id = treserva.cli_id) and (treserva.hab_id = thabitacion.hab_id)) and ((thabitacion.tip_id =ttipo_habitacion.tip_id) and (thabitacion.ciu_id=tciudad.ciu_id)) and treserva.est_id =2")) AS A
WHERE A.rownum BETWEEN ($inicio AND ($inicio + $registros)