CREATE PROCEDURE PFILOUPDATEMDCUSTOMER
(
	@CustomerID VARCHAR(20)
)	
AS
--DECLARE @CustomerID VARCHAR(20) = '00000253'

DECLARE @SLID VARCHAR(20)
SELECT @SLID = SubLedgerID FROM dbo.PMDSL0001 
WHERE CustomerID = @CustomerID

UPDATE dbo.PMDCUS0001
SET SubLedgerID = @SLID
--SELECT * FROM dbo.PMDCUS0001 
WHERE CustomerID = @CustomerID
