﻿
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	Returns the stored file bytes for a single invoice, for use by
--              the Azure Blob Storage startup backfill after the row has been
--              selected via fds__getInvoiceFiles_ForBlobArchive.
-- =============================================
CREATE PROCEDURE [dbo].[fds__getInvoiceFileContent]
	@Id varchar(10)
AS
BEGIN
	SET NOCOUNT ON;

	SELECT TOP(1) [Id], [file]
	FROM [dbo].[fds__invoices]
	WHERE [Id] = @Id AND @Id is not null AND [file] IS NOT NULL;
END
