Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

String Literal in the expression exceeds the maximum allowed length of 4000 characters. Expand / Collapse
Author
Message
Posted Thursday, September 06, 2012 12:51 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, September 17, 2012 2:33 AM
Points: 19, Visits: 91
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.

Post #1355060
Posted Thursday, September 06, 2012 3:00 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 2:19 PM
Points: 4,324, Visits: 9,665
1) Break down into multiple queries.

2) Use fewer characters.

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


____________________________________________________________________________________________

Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:

http://www.sqlservercentral.com/articles/Best+Practices/61537/

If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
Post #1355135
Posted Thursday, September 13, 2012 1:01 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Yesterday @ 2:10 PM
Points: 35, Visits: 84
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.
Post #1358808
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse