Stored Procedure input parameter getting truncated

  • Hello, i have a stored procedure defined as follows

    CREATE PROCEDURE SP_VERIFY_DFT_COLUMNS

    @i_tab_nm NVARCHAR(100),

    @i_col_lst VARCHAR(MAX),

    @o_rtn_cd INT OUTPUT

    AS

    ...

    When i call it with the following parameters, it cuts off the i_col_lst value.

    DECLARE @rc int

    DECLARE @i_tab_nm nvarchar(100)

    DECLARE @i_col_lst nvarchar(100)

    DECLARE @o_rtn_cd int

    SET @i_tab_nm = 'outlet'

    SET @i_col_lst = 'outlet_desc,outlet2_address,city_name,state_code,country,hours_desc,contact_text,search_allowed_cd,latitude'

    EXECUTE @rc = [esell].[esell].[SP_VERIFY_DFT_COLUMNS]

    @i_tab_nm

    ,@i_col_lst

    ,@o_rtn_cd OUTPUT

    GO

    output:

    outlet_desc,outlet2_address,city_name,state_code,country,hours_desc,contact_text,search_allowed_cd,l

    The last parameter value is cut off.

    Any ideas how to get around this?

    Best Regards,

    ~David

  • Well, the issue was my declaration of @i_col_lst nvarchar(100) was too small. Dummy!

    Best Regards,

    ~David

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply