pues el problema se soluciono creando una vista y llamandolo al store... nose como el sql server no puede trabajar sin la vista pero bueno
Código PHP:
create PROCEDURE Usp_Listar_HI_Paginar
@PageSize int,
@PageNumber int
as
SELECT Gender,
HealthIssueid,
NickName,
Age,
Location,
Specialty,
Date,
Subject,
Symptoms
from (SELECT Gender,
HealthIssueid,
NickName,
Age,
Location,
Specialty,
Date,
Subject,
Symptoms,
ROW_NUMBER() OVER (ORDER BY HealthIssueid ,NickName asc) AS RowNumber
FROM dbo.HelathIssueView
) as HealthIssue
WHERE RowNumber BETWEEN @PageSize * @PageNumber + 1
AND @PageSize * (@PageNumber + 1)
[PHP]exec Usp_Listar_HI_Paginar 10,0[PHP]