spAddUpdate_BackOfficeCodeTables

Parameters

Parameter Parameter Type Mode Description
@CodeTableID int IN
@XMLData ntext IN

Definition

Copy


            CREATE   PROCEDURE [dbo].[spAddUpdate_BackOfficeCodeTables]
            (
                @CodeTableID    int,
                @XMLData        ntext
            )
            AS
            BEGIN
                set nocount on            

                if (NOT EXISTS (select ID from BackOfficeCodeTables where CodeTableID=@CodeTableID) )
                    begin
                        INSERT INTO [dbo].[BackOfficeCodeTables]
                        (    
                            CodeTableID,
                            [XMLData]
                        ) 
                        VALUES 
                        (        
                            @CodeTableID,
                            @XMLData
                        )
                    end
                else 
                    begin
                        UPDATE [dbo].[BackOfficeCodeTables]
                        SET
                            [XMLData]    = @XMLData
                        WHERE CodeTableID=@CodeTableID
                    end    
            END