[Solved]Can not create Procedure

Results 1 to 6 of 6
  1. #1
    Hardcore Member ttlove9 is offline
    MemberRank
    Dec 2012 Join Date
    VietnamLocation
    147Posts

    Support [Solved]Can not create Procedure

    This is my database:
    http://www.box.com/s/3iaj2oezp8fpvgmry01j

    When i delete procedure "atum_CreateCharacterBulk_A" (in atum2_db_1 db) and recreate then SQLServer result error:



    How to fix it?

    - Link procedure "atum_CreateCharacterBulk_A": http://www.box.com/s/taqfhbwyi3cl145x1rwk
    or code:

    Code:
    USE [atum2_db_1]
    GO
    
    /****** Object:  StoredProcedure [dbo].[atum_CreateCharacterBulk_A]    Script Date: 21/05/2013 12:52:46 CH ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    
    -------------------------------
    -- A-GEAR
    -------------------------------
    --		2006-04-11 by cmkwon, td_Character Å×ÀÌºí¿¡ DownSPIOnDeath Çʵå Ãß°¡
    CREATE PROCEDURE [dbo].[atum_CreateCharacterBulk_A]
    	@i_AccName		VARCHAR(20),		-- »ý¼º °èÁ¤
    	@i_CharName		VARCHAR(20)			-- »ý¼º ij¸¯Å͸í
    AS
    	DECLARE @AccUID INT
    	SET @AccUID = (select AccountUniqueNumber from atum2_db_account.dbo.td_account WITH(NOLOCK) where AccountName = @i_AccName)
    	IF @AccUID IS NULL
    		RETURN
    
    	INSERT INTO td_Character
    		SELECT @i_CharName, @i_AccName, @AccUID, Gender, 2,
    					UnitKind, InfluenceType, SelectableInfluenceMask, PilotFace, 0, 0, AttackPart, DefensePart, FuelPart,
    					SoulPart, ShieldPart, DodgePart, GuildName, GuildUniqueNumber,
    					Level, Experience, 0, 0, BodyCondition, Propensity, Status,
    					PKWinPoint, PKLossPoint, Material, HP, DP,
    					SP, EP, PetName, PetLevel, PetExperience,
    					Position_X, Position_Y, Position_Z, MapIndex, ChannelIndex,
    					MaxLevel, currentHP, currentDP, currentSP, currentEP,
    					200, 200, 0, 0, 0, GetDate(), NULL, GetDate(), 0, 0, 0, 0, 0, 0, 0	-- 2006-12-18 by dhjin
    		FROM td_Character
    		WHERE CharacterName = 'A±â¾î'
    
    	-- ±âº» ¾ÆÀÌÅÛ »ðÀÔ
    	DECLARE @uniquenumber INT
    	SET @uniquenumber = (select uniquenumber from td_Character where charactername = @i_CharName)
    	-- // 2009-01-29 by cmkwon, ¹®ÀÚ¿­ Äõ¸® °Ë»ö½Ã ÇÊ¿ä¾ø´Â LIKE »ç¿ëÀ» Á¦°Å - 
    	-- SET @uniquenumber = (select uniquenumber from td_Character where charactername like @i_CharName)
    	IF (@uniquenumber IS NULL)
    		RETURN
    
    	EXEC dbo.atum_admin_InsertStoreItem_DB_by_CharacUniqueNum_for_default @uniquenumber, 7000050, 1000, 1, 2		-- 1Çü ¹«±â
    	EXEC dbo.atum_admin_InsertStoreItem_DB_by_CharacUniqueNum_for_default @uniquenumber, 7900440, 300, 1, 4			-- 2Çü ¹«±â - °¡µå
    	EXEC dbo.atum_admin_InsertStoreItem_DB_by_CharacUniqueNum_for_default @uniquenumber, 7002590, 1, 1, 6			-- ¿£Áø
    	EXEC dbo.atum_admin_InsertStoreItem_DB_by_CharacUniqueNum_for_default @uniquenumber, 7011500, 1, 1, 0		-- ¹ÌÅ° ·¹ÀÌ´Ù
    	EXEC dbo.atum_admin_InsertStoreItem_DB_by_CharacUniqueNum_for_default @uniquenumber, 8012100, 1, 1, 5		-- ¾Æ¸Ó - °¡´õ 2005-12-03 by cmkwon
    	EXEC dbo.atum_admin_InsertStoreItem_DB_by_CharacUniqueNum @uniquenumber, 7000022, 20000000					-- µ· »ðÀÔ
    
    
    GO
    Thanks


  2.  
  3. #2
    ):-v Future is online now
    ModeratorRank
    Dec 2011 Join Date
    302Posts

    Re: Can not create Procedure

    too less info!

    which kind of error?
    how are you logged in, in the database?
    which shemas has the account you use to login the database?

  4. #3
    Hardcore Member ttlove9 is offline
    MemberRank
    Dec 2012 Join Date
    VietnamLocation
    147Posts

    Re: Can not create Procedure

    Msg 213, Level 16, State 1, Procedure atum_CreateCharacterBulk_A, Line 16
    Column name or number of supplied values does not match table definition.


    I logged in SQLServer with login: atum, password: callweb (Roles=sysadmin)

  5. #4
    Hardcore Member ttlove9 is offline
    MemberRank
    Dec 2012 Join Date
    VietnamLocation
    147Posts

    Re: Can not create Procedure

    Solved! missing NickName column in INSERT INTO query

  6. #5
    XRivals mKeey is offline
    True MemberRank
    Aug 2010 Join Date
    372Posts

  7. #6
    Hardcore Member ttlove9 is offline
    MemberRank
    Dec 2012 Join Date
    VietnamLocation
    147Posts

    Re: Can not create Procedure

    Thanks! :)


  8.  

    Latest Gaming Releases

Advertisement