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 |
|
Prashant
Starting Member
2 Posts |
Posted - 2004-08-12 : 05:57:20
|
| HiI have a stored procedure with a parameter of type ntext. I am trying to use replace function on this parameter to replace few characters, but replace function doesn't work with ntext data types.Please suggest me an alternative for replacing characters of ntext datatype from a stored procedure point of view. Thanks Prashant |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2004-08-12 : 06:07:32
|
| You can use WRITETEXT or UPDATETEXT.Look them up in books online.Duane. |
 |
|
|
Prashant
Starting Member
2 Posts |
Posted - 2004-08-12 : 06:24:19
|
| If you could help me in using that it would be great.Thanks |
 |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2004-08-12 : 06:27:29
|
quote: From Books OnLineExamplesThis example puts the text pointer into the local variable @ptrval, and then WRITETEXT places the new text string into the row pointed to by @ptrval.[CODE]USE pubsGOEXEC sp_dboption 'pubs', 'select into/bulkcopy', 'true'GODECLARE @ptrval binary(16)SELECT @ptrval = TEXTPTR(pr_info) FROM pub_info pr, publishers pWHERE p.pub_id = pr.pub_id AND p.pub_name = 'New Moon Books'WRITETEXT pub_info.pr_info @ptrval 'New Moon Books (NMB) has just released another top ten publication. With the latest publication this makes NMB the hottest new publisher of the year!'GOEXEC sp_dboption 'pubs', 'select into/bulkcopy', 'false'GO[/CODE]
Duane. |
 |
|
|
|
|
|