spAddUpdate_UserPageManager

Parameters

Parameter Parameter Type Mode Description
@PKID int IN

Definition

Copy

CREATE PROCEDURE [dbo].[spAddUpdate_UserPageManager]
    (
        @PKID                int
    )
    AS

    declare @MeCount int
    select @MeCount=count(SiteContentID) 
        from UserPageManager where SiteContentID=@PKID

    if (@MeCount<=0)
        begin
            /** new content **/
            INSERT INTO UserPageManager(
                SiteContentID
            )VALUES(
                @PKID
            )

            /** SELECT @PKID **/

        end    
    /*
            Place holder until we have additional properties
            no point in updating the primary key with itself..
    else
        begin
            UPDATE UserPageManager
                set SiteContentID = @PKID
                where SiteContentID = @PKID
            end
    */