String Literal in the expression exceeds the maximum allowed length of 4000 characters.

  • Hi All,

    I need a small help. In my ssis package, huge SQL statement is constructed through expressions

    Problem:

    SQL is exceeding more than 4000 characters.

    Could anyone please share the thoughts / work around to resolve the issue.

    Thanks in advance.

  • 1) Break down into multiple queries.

    2) Use fewer characters.

    3) Call a parameterised stored proc to do the work for you.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Everything the fellow reponder (PP) said :

    Break doen into smaller queries

    Write short expressions(maybe even shorter variable names)

    Parametreized stored proc

    Might i also suggest :

    Have a .sql file in which you write out your command and then have your ssis execute that instead.

    A long winded way but will work.

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

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