I need to concatenate 2 ntext columns into one. I can't convert them to nchar, cause both contains strings longer than 4000 chars. Is there a way to do this in SQL Server 2005?
相关问题
- sql execution latency when assign to a variable
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
- SQL to Parse a Key-Value String
相关文章
- Entity Framework 4.3.1 failing to create (/open) a
- Code for inserting data into SQL Server database u
- Delete Every Alternate Row in SQL
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
- Is recursion good in SQL Server?
- How can I convert a OLE Automation Date value to a
But really - with SQL Server 2005,
NTEXT
becomes deprecated and will most likely be phased out in SQL Server 2008 R2 or one release later.NVARCHAR(MAX)
is the logical successor, giving you allNTEXT
ever gave you, and a lot more!If your fields would be
NVARCHAR(MAX)
from the beginning, you could just write:and be done with it!
I'd suggest you upgrade your tables to use
NVARCHAR(MAX)
instead ofNTEXT
.Marc
There is a way to update ntext column:
Here are more information.
Convert them to
nvarchar(max)
for the concatentation. It's the SQL 2005 replacement forntext
and allows all the usualnvarchar
operations.