Running Stored Procedure gives error --> The identifier that starts with is too long. Maximum length is 128.

  • Hi,

    Please help me about this problem. I am trying to run stored procedure but when argument is long. it gives error The identifier that starts with is too long. Maximum length is 128.

    I have rounded my parameters with [] characters because I have strings inside of the parameter values Like [UnitSno LIKE 'AZX%']. And I dont know what chracaters to round the parameter value if the parameter contains some strings inside of the paprameter like [UnitSno LIKE 'AZX%']

    If I am trying to pass below command to SP it gives error

    [SP_ASD_LIMITED_RESULT] [UNIT_REP], [UnitRepairKey], '*', 'UnitSno LIKE 'AZX%'', 20, 20

    Below call of the SP is working fine and gives expected results

    execute [SP_ASD_LIMITED_RESULT] [UNIT_REP], [UnitRepairKey], '*', [UnitSno LIKE 'AZX%'], 20, 20

    If I put inside of the [] characters long enough statement then this

    "The identifier that starts with is too long. Maximum length is 128."

    error is coming. Like below

    execute 'SP_ASD_LIMITED_RESULT' 'UNIT_REP', 'UnitRepairKey', '*', [UnitSno LIKE 'AZX%', abcde = 'balaa blaa%', wer= 'balaa blaa%', tyh= 'balaa blaa%', fret= 'balaa blaa%', abcythjghde = 'balaa blaa%', abcfdfde = 'balaa blaa%', erdf= 'balaa blaa%', abdfdfcde = 'balaa blaa%', abcde = 'balaa blaa%', rtytu= 'balaa blaa%', abwetgdwcde = 'balaa blaa%', abcde = 'balaa blaa%', kjui= 'balaa blaa%', nyhbg= 'balaa blaa%', uujiu= 'balaa blaa%', etgyhy= 'balaa blaa%',], 20, 20

    So question is what characters to use if I want to pass long statement to SP and it's contains parameters what includes --> 'asd%'

    Br,

    SQLMike

  • Please don't cross post. It just wastes peoples time and fragments replies.

    No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic688600-338-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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