Quote Originally Posted by xlmansox View Post
work perfect 100%









- - - Updated - - -

an easy to add that i make.

1.Remove primary key.


from all of this table.



2.here is a query to make it easy :)

Code:
USE [C9Service]
GO
/****** Object:  StoredProcedure [Admin].[UspAddShopProduct]    Script Date: 01/05/2016 23:00:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/******************************************************************************
**        Name: UspAddShopProduct
**        Desc: 상품 정보를 등록한다
**
**        Auth: 김석천
**        Date: 20110603
*******************************************************************************
**        Change History
*******************************************************************************
**        Date:        Author:                Description:
**        --------    --------            ---------------------------------------
**        2011-07-26    김석천                cClassKey 추가
**        2011-11-30    김석천                cLevel -> cLevelMin, cLevelMax
*******************************************************************************/
ALTER PROCEDURE [Admin].[UspAddShopProduct]
    @pBranchId            NVARCHAR(20),
    @pProductId            NVARCHAR(20),
    @pProductName            NVARCHAR(40),
    @pPrice            int,
    @pProductDesc            NVARCHAR(500),
    @pGiftYN            tinyint,
    @pLevelMin            int,
    @pLevelMax            int,
    @pUnitName            NVARCHAR(50),
    @pProductType            NVARCHAR(20),
    @pClassName            NVARCHAR(40),
    @pClassKey            TINYINT,
 @Precommend            int
AS
BEGIN
    SET NOCOUNT ON
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    
    SET LOCK_TIMEOUT 5000;
    SET XACT_ABORT ON
    
    DECLARE @AerrNo INT,
            @aRowCnt INT


    SELECT @AerrNo = 0, @aRowCnt = 0


    INSERT INTO [Server].[TblShopProductInfo] (
        cBranchId,
        cProductId,
        cProductName,
        cMoneyCode,
        cPrice,
        cDiscountRate,
        cRegDate,
        cStartDate,
        cEndDate,
        cProductDesc,
        cGiftYN,
        cSellTotalCount,
        cLevelMin,
        cLevelMax,
        cDuplicateSell,
        cUnitName,
        cProductType,
        cDispOrder,
        cDiscountInfo,
        cClassName,
        cClassKey,
        cRefundYN,
        cPageNum,
        cRecommend
    )
    VALUES (
        @pBranchId,
        @pProductId,
        @pProductName,
        'Cash',
        @pPrice,
        '0',
        '2.01111e+013',
        '2.01111e+013',
        '2.01111e+013',
        @pProductDesc,
        @pGiftYN,
        '0',
        @pLevelMin,
        @pLevelMax,
        '1',
        @pUnitName,
        @pProductType,
        '1',
        NULL,
        @pClassName,
        @pClassKey,
        '0',
        '1',
     @Precommend
    )
    
    INSERT INTO [Server].[TblShopProductDetailInfo](
    cChildProductId,
    cProductId,
    cPrice,
    cUnitName,
    cValidTerm,
    cPossibleLevel,
    cUseCount,
    cPeriod,
    cCoinPrice,
    cGameMoneyPrice,
    cClassName ) 
    
    VALUES(
    @pProductId,
    @pProductId,
    @pPrice,
    @pUnitName,
    '0',
    '0',
    '1',
    '0',
    '0',
    '0',
    @pClassName)
    
    SELECT @AerrNo = @@Error, @aRowCnt = @@RowCount
    IF  @AerrNo <> 0) OR (@aRowCnt <> 1)
    BEGIN
        RETURN (1)
    END
    
    RETURN (0)
END
I did it but it did not work.