Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
T-SQL
»
UPDATETEXT or WRITETEXT?
UPDATETEXT or WRITETEXT?
Rate Topic
Display Mode
Topic Options
Author
Message
Tom Carnahan
Tom Carnahan
Posted Friday, January 22, 2010 2:16 PM
Valued Member
Group: General Forum Members
Last Login: Sunday, February 17, 2013 6:28 AM
Points: 69,
Visits: 1,441
Hello,
I searched the prior posts and scrutinized the BOL ... I still have some confusion.
I am stuck with a database application that uses SS2k (no way of upgrading). A table the application uses has a field that is NVARCHAR(4000) ... stores non-Latin character sets ... that needs to be changed to NTEXT in order to store more character data. I understand my choices are UPDATETEXT and WRITETEXT.
Q1: If I am completely replacing the contents of
one field in one row
, do I use UPDATETEXT or WRITETEXT?
Q2: I am not having much luck getting UPDATETEXT to completely remove the old text and replace it with the new. Could someone show me the correct way to "replace all existing" text in the one field in the one row?
Thanks ahead of time for any help you can provide!
Post #852346
Sergiy
Sergiy
Posted Friday, January 22, 2010 2:18 PM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Today @ 12:11 PM
Points: 4,544,
Visits: 8,190
Did you try simple UPDATE?
Post #852347
Tom Carnahan
Tom Carnahan
Posted Friday, January 22, 2010 5:15 PM
Valued Member
Group: General Forum Members
Last Login: Sunday, February 17, 2013 6:28 AM
Points: 69,
Visits: 1,441
BOL recommends that you don't use UPDATE with NTEXT since the field only holds a pointer to "out of row" data.
Post #852420
Tom Carnahan
Tom Carnahan
Posted Friday, January 22, 2010 5:17 PM
Valued Member
Group: General Forum Members
Last Login: Sunday, February 17, 2013 6:28 AM
Points: 69,
Visits: 1,441
NTEXT can hold up to 2 Billion characters. The max number of bytes for a row in SS2K is 8060. SS2K stores the data in other places and only keeps a pointer in the field.
Post #852422
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.