You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
390 B
18 lines
390 B
CREATE OR ALTER PROCEDURE [dbo].[Transaction_ReadByUserId] |
|
@UserId UNIQUEIDENTIFIER, |
|
@Limit INT, |
|
@StartAfter DATETIME2 = NULL |
|
AS |
|
BEGIN |
|
SET NOCOUNT ON |
|
|
|
SELECT |
|
TOP (@Limit) * |
|
FROM |
|
[dbo].[TransactionView] |
|
WHERE |
|
[UserId] = @UserId |
|
AND (@StartAfter IS NULL OR [CreationDate] < @StartAfter) |
|
ORDER BY |
|
[CreationDate] DESC |
|
END
|
|
|