[dbo].[GetBranchesByVendorConnectIntegrator]
create procedure [dbo].[GetBranchesByVendorConnectIntegrator]
@inIntegratorKeyID nvarchar(4)
AS
set nocount on;
select
BranchPriKey = VendorConnectBranch.BranchFID,
ConnectionIdentifier = VendorConnectBranch.ExternalCode
from VendorConnectBranch
inner join VendorConnect on VendorConnect.VendorConnectID = VendorConnectBranch.VendorConnectFID
inner join MoversConnectVendor on MoversConnectVendor.MoversConnectVendorID = VendorConnect.MoversConnectVendorFID
where VendorConnectBranch.Inactive = 0 and
VendorConnect.Inactive = 0 and
MoversConnectVendor.MoversConnectInactive = 0 and
MoversConnectVendor.IntegratorKeyID = @inIntegratorKeyID
for xml raw
GO
GRANT EXECUTE ON [dbo].[GetBranchesByVendorConnectIntegrator] TO [MssExec]
GO