biztalk rosettanet 사용자 정의 pip code
USE [BTARNDATA]
GO
/****** Object: StoredProcedure [dbo].[proc_GetActivityStatus] Script Date: 09/16/2015 16:16:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[proc_GetActivityStatus]
(
@PIPCode varchar(10),
@PIPVersion varchar(20),
@PIPInstanceID nvarchar(255),
@SourcePartnerName nvarchar(255),
@DestinationPartnerName nvarchar(255),
@IsInitiatorActivity bit
)
AS
IF (@DestinationPartnerName = 'SEAGATE-AMK' and @PIPCode = 'SG_3B2')
BEGIN
SET @PIPCode = '3B2'
END
IF (@DestinationPartnerName = 'SEAGATE-US' and @PIPCode = 'SG_3B2')
BEGIN
SET @PIPCode = '3B2'
END
IF (@DestinationPartnerName = 'SEAGATE-USML' and @PIPCode = 'SG_3B2')
BEGIN
SET @PIPCode = '3B2'
END
IF (@DestinationPartnerName = 'SEAGATE-AMK' and @PIPCode = 'SG_4B2')
BEGIN
SET @PIPCode = '4B2'
END
IF (@DestinationPartnerName = 'SEAGATE-US' and @PIPCode = 'SG_4B2')
BEGIN
SET @PIPCode = '4B2'
END
IF (@DestinationPartnerName = 'SEAGATE-USML' and @PIPCode = 'SG_4B2')
BEGIN
SET @PIPCode = '4B2'
END
DECLARE @sourcePartnerKey int
DECLARE @destinationPartnerKey int
DECLARE @ActivityID nvarchar(255)
SET @sourcePartnerKey = '-1'
SET @destinationPartnerKey = '-1'
SELECT @sourcePartnerKey = PartnerKey FROM PartnerLookup WHERE PartnerName=@SourcePartnerName
SELECT @destinationPartnerKey = PartnerKey FROM PartnerLookup WHERE PartnerName=@DestinationPartnerName
SELECT TOP 1 CurrentStatus
FROM ActivityTracking tblAT
WHERE tblAT.PIPCode = @PIPCode AND
tblAT.PIPVersion = @PIPVersion AND
tblAT.PIPInstanceID = @PIPInstanceID AND
tblAT.SourcePartnerKey = @sourcePartnerKey AND
tblAT.DestinationPartnerKey = @destinationPartnerKey AND
tblAT.IsInitiatorActivity = @IsInitiatorActivity
USE [BTARNCONFIG]
GO
/****** Object: StoredProcedure [dbo].[GetTPAConfigData] Script Date: 09/16/2015 16:47:17 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[GetTPAConfigData](
@PIPCode char(20),
@PIPVersion char(10),
@HomePartnerName nvarchar(255),
@TradingPartnerName nvarchar(255),
@IsHomeRoleInitiator tinyint)
AS
DECLARE @homePartnerKey int
DECLARE @tradingPartnerKey int
SET @homePartnerKey = '-1'
SET @tradingPartnerKey = '-1'
SELECT @homePartnerKey = PartnerKey FROM PartnerLookup WHERE PartnerName=@HomePartnerName
SELECT @tradingPartnerKey = PartnerKey FROM PartnerLookup WHERE PartnerName=@TradingPartnerName
if (@homePartnerKey = -1 and @HomePartnerName <> '')
BEGIN
INSERT INTO PartnerLookup(PartnerName) VALUES(@HomePartnerName)
SELECT @homePartnerKey = @@IDENTITY
END
if (@tradingPartnerKey = -1 and @TradingPartnerName <> '')
BEGIN
INSERT INTO PartnerLookup(PartnerName) VALUES(@TradingPartnerName)
SELECT @tradingPartnerKey = @@IDENTITY
END
IF (@TradingPartnerName = 'SEAGATE-AMK' and @PIPCode = '3B2')
BEGIN
SET @PIPCode = 'SG_' + @PIPCode
END
IF (@TradingPartnerName = 'SEAGATE-US' and @PIPCode = '3B2')
BEGIN
SET @PIPCode = 'SG_' + @PIPCode
END
IF (@TradingPartnerName = 'SEAGATE-USML' and @PIPCode = '3B2')
BEGIN
SET @PIPCode = 'SG_' + @PIPCode
END
IF (@TradingPartnerName = 'SEAGATE-AMK' and @PIPCode = '4B2')
BEGIN
SET @PIPCode = 'SG_' + @PIPCode
END
IF (@TradingPartnerName = 'SEAGATE-US' and @PIPCode = '4B2')
BEGIN
SET @PIPCode = 'SG_' + @PIPCode
END
IF (@TradingPartnerName = 'SEAGATE-USML' and @PIPCode = '4B2')
BEGIN
SET @PIPCode = 'SG_' + @PIPCode
END
SELECT tc.*
FROM TPAConfig tc, PIPConfig pc
WHERE @PIPCode = pc.Code
AND @PIPVersion = pc.Version
AND @homePartnerKey = tc.HomePartnerKey
AND @tradingPartnerKey = tc.TradingPartnerKey
AND pc.ID = tc.PIPID
AND @IsHomeRoleInitiator = tc.IsHomeRoleInitiator
AND Status = '1'
ORDER BY tc.Name
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.