Files
ZelWiki/ZelWiki.Repository/Scripts/GetAllExceptionsPaged.sql
2025-02-20 15:20:28 +08:00

29 lines
423 B
SQL

SELECT
Id,
[Text],
[ExceptionText],
[StackTrace],
[CreatedDate],
@PageSize as PaginationPageSize,
(
SELECT
CAST((Count(0) + (@PageSize - 1.0)) / @PageSize AS INTEGER)
FROM
[Exception] as P
) as PaginationPageCount
FROM
[Exception]
--CUSTOM_ORDER_BEGIN::
--CONFIG::
/*
Id=Id
CreatedDate=[CreatedDate]
*/
--::CONFIG
ORDER BY
Id
--::CUSTOM_ORDER_BEGIN
LIMIT @PageSize
OFFSET (@PageNumber - 1) * @PageSize