Hi there,
I have taken over a SQL 2000 database and within it is a table which has
content for ASP web pages.
Some of the content is pretty long, and for some reason is displayed as
<Long Text> in the table, up returning all rows.
I need to change this text, how can i do this by ammending the existing
text? I need to see what is there!
Hope you guys can help,
Thanx
Thanks in advance
Fawke
Please remove ANTI and SPAM
from my email address before emailing me.
www.bradflack.com
sorry, what are these?
forgive me, i am quite new to SQL
Thanks in advance
Fawke
Please remove ANTI and SPAM
from my email address before emailing me.
www.bradflack.com
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23v0unqEKEHA.1392@.TK2MSFTNGP09.phx.gbl...
> Fawke
> Look at UPDATETEXT in the BOL
>
> "Fawke101" <guy@.ANTIbradflack.SPAMcom> wrote in message
> news:unRgynEKEHA.952@.TK2MSFTNGP12.phx.gbl...
>
|||BOL says:
Updates an existing text, ntext, or image field. Use UPDATETEXT to change
only a portion of a text, ntext, or image column in place. Use WRITETEXT to
update and replace an entire text, ntext, or image field.
This example puts the text pointer into the local variable @.ptrval, and then
uses UPDATETEXT to update a spelling error.
USE pubs
GO
EXEC sp_dboption 'pubs', 'select into/bulkcopy', 'true'
GO
DECLARE @.ptrval binary(16)
SELECT @.ptrval = TEXTPTR(pr_info)
FROM pub_info pr, publishers p
WHERE p.pub_id = pr.pub_id
AND p.pub_name = 'New Moon Books'
UPDATETEXT pub_info.pr_info @.ptrval 88 1 'b'
GO
EXEC sp_dboption 'pubs', 'select into/bulkcopy', 'false'
GO
For more details please refer to BOL (Books Online)
"Fawke101" <guy@.ANTIbradflack.SPAMcom> wrote in message
news:#LILT2EKEHA.2660@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> sorry, what are these?
> forgive me, i am quite new to SQL
> --
> Thanks in advance
> Fawke
> Please remove ANTI and SPAM
> from my email address before emailing me.
> www.bradflack.com
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:%23v0unqEKEHA.1392@.TK2MSFTNGP09.phx.gbl...
has[vbcol=seagreen]
as[vbcol=seagreen]
existing
>
|||Check out below articles:
From classic VB code and ADO:
http://support.microsoft.com/default...;EN-US;q258038
From .NET code and ADO.NET:
http://support.microsoft.com/default...;en-us;Q316887
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Fawke101" <guy@.ANTIbradflack.SPAMcom> wrote in message news:unRgynEKEHA.952@.TK2MSFTNGP12.phx.gbl...
> Hi there,
> I have taken over a SQL 2000 database and within it is a table which has
> content for ASP web pages.
> Some of the content is pretty long, and for some reason is displayed as
> <Long Text> in the table, up returning all rows.
> I need to change this text, how can i do this by ammending the existing
> text? I need to see what is there!
> Hope you guys can help,
> Thanx
> --
> Thanks in advance
> Fawke
> Please remove ANTI and SPAM
> from my email address before emailing me.
> www.bradflack.com
>
|||Still a tad confused, is this the only way?
Can i not just view this in the table, i want to "see" what is there now,
and type in the new words/values.
Just like i would when changing a shorter piece of text (that i can see!) in
a table.....
Thanks in advance
Fawke
Please remove ANTI and SPAM
from my email address before emailing me.
www.bradflack.com
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23$G4w7EKEHA.2756@.TK2MSFTNGP10.phx.gbl...
> BOL says:
> Updates an existing text, ntext, or image field. Use UPDATETEXT to change
> only a portion of a text, ntext, or image column in place. Use WRITETEXT
to
> update and replace an entire text, ntext, or image field.
> This example puts the text pointer into the local variable @.ptrval, and
then
> uses UPDATETEXT to update a spelling error.
> USE pubs
> GO
> EXEC sp_dboption 'pubs', 'select into/bulkcopy', 'true'
> GO
> DECLARE @.ptrval binary(16)
> SELECT @.ptrval = TEXTPTR(pr_info)
> FROM pub_info pr, publishers p
> WHERE p.pub_id = pr.pub_id
> AND p.pub_name = 'New Moon Books'
> UPDATETEXT pub_info.pr_info @.ptrval 88 1 'b'
> GO
> EXEC sp_dboption 'pubs', 'select into/bulkcopy', 'false'
> GO
> For more details please refer to BOL (Books Online)
>
>
> "Fawke101" <guy@.ANTIbradflack.SPAMcom> wrote in message
> news:#LILT2EKEHA.2660@.TK2MSFTNGP09.phx.gbl...
> has
> as
> existing
>
|||the field is ntext, where do i run this code? can i do this within the table
query?
a bit double-dutch
Thanks in advance
Fawke
Please remove ANTI and SPAM
from my email address before emailing me.
www.bradflack.com
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23$G4w7EKEHA.2756@.TK2MSFTNGP10.phx.gbl...
> BOL says:
> Updates an existing text, ntext, or image field. Use UPDATETEXT to change
> only a portion of a text, ntext, or image column in place. Use WRITETEXT
to
> update and replace an entire text, ntext, or image field.
> This example puts the text pointer into the local variable @.ptrval, and
then
> uses UPDATETEXT to update a spelling error.
> USE pubs
> GO
> EXEC sp_dboption 'pubs', 'select into/bulkcopy', 'true'
> GO
> DECLARE @.ptrval binary(16)
> SELECT @.ptrval = TEXTPTR(pr_info)
> FROM pub_info pr, publishers p
> WHERE p.pub_id = pr.pub_id
> AND p.pub_name = 'New Moon Books'
> UPDATETEXT pub_info.pr_info @.ptrval 88 1 'b'
> GO
> EXEC sp_dboption 'pubs', 'select into/bulkcopy', 'false'
> GO
> For more details please refer to BOL (Books Online)
>
>
> "Fawke101" <guy@.ANTIbradflack.SPAMcom> wrote in message
> news:#LILT2EKEHA.2660@.TK2MSFTNGP09.phx.gbl...
> has
> as
> existing
>
|||You can execute the statements in Query Analyzer.
-Sue
On Thu, 22 Apr 2004 11:17:14 +0100, "Fawke101"
<guy@.ANTIbradflack.SPAMcom> wrote:
>the field is ntext, where do i run this code? can i do this within the table
>query?
>a bit double-dutch
|||Fawke
Look at UPDATETEXT in the BOL
"Fawke101" <guy@.ANTIbradflack.SPAMcom> wrote in message
news:unRgynEKEHA.952@.TK2MSFTNGP12.phx.gbl...
> Hi there,
> I have taken over a SQL 2000 database and within it is a table which has
> content for ASP web pages.
> Some of the content is pretty long, and for some reason is displayed as
> <Long Text> in the table, up returning all rows.
> I need to change this text, how can i do this by ammending the existing
> text? I need to see what is there!
> Hope you guys can help,
> Thanx
> --
> Thanks in advance
> Fawke
> Please remove ANTI and SPAM
> from my email address before emailing me.
> www.bradflack.com
>
没有评论:
发表评论