Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2006-02-01 : 08:08:01
|
| If the query length is more than 8000 characters and it is saved in a table column having text data type then how can execute this query using TSQL? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-02-01 : 08:53:03
|
| select substring(textCol,8001,8000) from yourTableMadhivananFailing to plan is Planning to fail |
 |
|
|
Norwich
Posting Yak Master
158 Posts |
Posted - 2006-02-02 : 12:21:58
|
I'm Assuming that the Query is the only thing that's saved in the column Declare @SQl TextSelect @SQL = ColumnNamefrom YourTableExecute (@SQL) NThe revolution won't be televised! |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-02-03 : 09:15:57
|
quote: Originally posted by Norwich I'm Assuming that the Query is the only thing that's saved in the column Declare @SQl TextSelect @SQL = ColumnNamefrom YourTableExecute (@SQL) NThe revolution won't be televised!
You will get the errorServer: Msg 2739, Level 16, State 1, Procedure #t, Line 3The text, ntext, and image data types are invalid for local variables.To deal with more than 8000 characters, search for 8000 in this topichttp://sqlteam.com/forums/topic.asp?TOPIC_ID=55210MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|