spAddUpdate_Kpi
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PKID | int | INOUT | |
@SiteContentID | int | IN | |
@StartDate | datetime | IN | |
@KpiDashboardPageID | uniqueidentifier | IN |
Definition
Copy
create procedure dbo.spAddUpdate_Kpi (
@PKID int output,
@SiteContentID int,
@StartDate datetime,
@KpiDashboardPageID uniqueidentifier
) as
begin transaction
if (@PKID<=0) begin
insert into Kpi
(
SiteContentID,
StartDate,
KpiDashboardPageID
)
values
(
@SiteContentID,
@StartDate,
@KpiDashboardPageID
);
select @PKID = @@Identity;
end else begin
update Kpi set
StartDate = StartDate,
SiteContentID = @SiteContentID,
KpiDashboardPageID = @KpiDashboardPageID
where
ID = @PKID;
end
commit transaction