spAddUpdate_ContentComparisonPart
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PKID | int | INOUT | |
@StartedDate | datetime | IN | |
@EndedDate | datetime | IN | |
@TargetPID | int | IN | |
@SiteContentID | int | IN | |
@Threshold | int | IN |
Definition
Copy
CREATE PROCEDURE [dbo].[spAddUpdate_ContentComparisonPart]
(
@PKID int output,
@StartedDate datetime,
@EndedDate datetime,
@TargetPID int,
@SiteContentID int,
@Threshold int
)
AS
begin transaction
if (@PKID<=0)
begin
INSERT INTO ContentComparisonPart
(
[SiteContentID],
[StartedDate],
[EndedDate],
[TargetPID],
[Threshold]
)
VALUES
(
@SiteContentID,
@StartedDate,
@EndedDate,
@TargetPID,
@Threshold
)
SELECT @PKID = @@Identity
end
else
begin
UPDATE ContentComparisonPart SET
[StartedDate]=@StartedDate,
[EndedDate]=@EndedDate,
[TargetPID]=@TargetPID,
[Threshold]=@Threshold
WHERE ID=@PKID
end
commit transaction