|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 10:26 AM
Points: 5,
Visits: 138
|
|
Hi all,
I have a query more than 4000 characters limit .I am setting with variables to the query.while i used the string expression i am getting error like string expression is limited to 4000 characters limit.Is any one have idea about how to eliminate the length limit in expression.
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 1:55 PM
Points: 15,442,
Visits: 9,571
|
|
Replace the string expression with either a code object or a stored proceduring, depending on what you are trying to do with it.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 1:10 PM
Points: 2,673,
Visits: 2,418
|
|
Fortunately the 4000 character limit is an expression limitation, not a limitation of the number of characters in the string.
I have not done this personally but you might be able to break your expression down into parts and set a variable to each section. For example Var1, Var2, Var3, SQLVar. Then Var1 = SELECT........ Var2 = FROM..... Var3 = WHERE.... SQLVar = Var1 + Var2 + Var3
If that doesn't work the other way is to pull the query as suggested above from SQL built as a stored procedure, or from a column in a table that stores the entire query, and then set your variable value to the string returned.
|
|
|
|