I'm working with PHP and I have about 8000 records currently in DB.
As it is for a web page, I need to make a pagination to be viable reading the data.
As I understand it, I have to do something similar to limit
and offset
to show 50 out of 50 pages, but I do not know how to do this with SQL Server.
IneedtoworkwithJoinbelow:
selectos.id,os.dataHora,material.nomeasnomeEquip,cliente.nomeFantasia,setor.nomeasNomeSetor,os.motivoOs,(selectsum(itemMaterial.valorUnitario)fromosasOS1innerjoinitemMaterialonitemMaterial.id=os.idItemMaterialwhereOS1.id=os.id)asTotalMaterial,tipoOs.nomeasNomeTipoOS,itemMaterial.nSerie,itemMaterial.rm,os.statusfromosinnerjoinitemMaterialonitemMaterial.id=os.idItemMaterialinnerjoinmodeloonmodelo.id=itemMaterial.idModeloinnerjoinmaterialonmaterial.id=itemMaterial.idMaterialinnerjoinclienteoncliente.id=os.idClienteinnerjoinsetoronsetor.id=os.idSetorinnerjoinusuarioonusuario.id=os.idUsuarioSolicitanteinnerjointipoOsontipoOs.id=os.idTipoOswherecliente.id=(selectusuario.idClientefromusuariowhereusuario.login='julio')orderbydataHoradesc
GIST
How to proceed in this case?