
[dbo].[GetPlasticWebDealBranchID]
create procedure [dbo].[GetPlasticWebDealBranchID]
@inMoversConnectId bigint,
@outBranchID varchar(5) output
as
set nocount on
set @outBranchID = isnull( (
select top 1
Branch.BranchID
from PlasticWebDeal
inner join Branch on Branch.BranchPriKey = PlasticWebDeal.BranchPriKey
where PlasticWebDeal.MoversConnectFID = @inMoversConnectId
), '' )
GO
GRANT EXECUTE ON [dbo].[GetPlasticWebDealBranchID] TO [MssExec]
GO