SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Readinng and exploring info from a ntext field
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Paulo Valentim
Starting Member

2 Posts

Posted - 04/12/2007 :  09:59:58  Show Profile  Reply with Quote
I would like to know how can i read a ntxt fild and durinng this process i want to extract informations from this field. My situation is this: this field register an html page, and i want to get some informations from this html text. To make it possible i have to read an manipulate this text fild.

Does anybody know how to do it?

Thanks

SwePeso
Patron Saint of Lost Yaks

Sweden
30281 Posts

Posted - 04/12/2007 :  10:28:32  Show Profile  Visit SwePeso's Homepage  Reply with Quote
UPDATETEXT function is useful.

Important:
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use the large-value data types and the .WRITE clause of the UPDATE statement instead.

Here is an example taken from Books Online. It is little tricky to manipulate text columns in SQL Server.
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';



Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30281 Posts

Posted - 04/12/2007 :  10:29:15  Show Profile  Visit SwePeso's Homepage  Reply with Quote
To extract information, I think you can use SUBSTRING. However, I am not 100% sure.



Peter Larsson
Helsingborg, Sweden
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000