UpdateFileRow.sql 712 B

1234567891011121314151617181920
  1. CREATE PROCEDURE [dbo].[UpdateFileRow]
  2. @rowId INT,
  3. @exception NVARCHAR(MAX) = NULL,
  4. @attemptCount INT = NULL,
  5. @status INT,
  6. @newfilename NVARCHAR(1024) = NULL,
  7. @newfilesize BIGINT = NULL,
  8. @originalfilesize BIGINT = NULL,
  9. @lastModifiedWhen DATETIME2 = NULL,
  10. @owner NVARCHAR(1023) = NULL
  11. AS
  12. -- Update the row
  13. UPDATE Files
  14. SET [Status] = @status, [CompletedWhen] = GETUTCDATE(), [Exception] = @exception, [AttemptCount] = @attemptCount, [NewFileName] = @newfilename, [NewFileSize] = @newfilesize, [OriginalFileSize] = @originalfilesize, [LastModifiedWhen] = @lastModifiedWhen, [Owner] = @owner
  15. WHERE [Id] = @rowId
  16. -- Get the row to send back to the script
  17. SELECT * FROM Files f WHERE f.[Id] = @rowId