Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

DECLARE @CarrierProviderID uniqueidentifier, @CarrierID uniqueidentifier, @NEWID uniqueidentifier, @CarrierName nvarchar(max), @CarrierProvider nvarchar(max),
@DCCompanyID uniqueidentifier, @DCID uniqueidentifier, @DCCompanyName nvarchar(max)
SET @CarrierName = 'IND NLOmni Parcel'
SET @CarrierProvider = 'Indigina TMS'
SET @DCCompanyName = 'Seko Hong Kong'
SET @NEWID = NEWID()

SELECT TOP 1 @DCCompanyID = CompanyID FROM Company WHERE DisableLevel = 0 AND CompanyID = OwnerCompanyID AND CompanyDescription = @DCCompanyName ORDER BY CreateDate
SELECT TOP 1 @DCID = DCID FROM DC WHERE DisableLevel = 0 AND CompanyID = @DCCompanyID ORDER BY CreateDate
SELECT TOP 1 @CarrierProviderID = CarrierProviderID FROM CarrierProvider WHERE Name = @CarrierProvider
SELECT TOP 1 @CarrierID = CompanyID FROM Company WHERE CompanyDescription = @CarrierName AND OwnerCompanyID = CompanyID AND DisableLevel = 0 ORDER BY CreateDate

INSERT INTO CarrierProviderIntegration (CarrierProviderIntegrationID, CarrierProviderID, CustomerID, DCID, CarrierID, CreateDate)
VALUES (@NEWID, @CarrierProviderID, NULL, NULL@DCID, @CarrierID, GETUTCDATE())

...