find uniqueidentifier's in text or ntext fields

hi experts

can anyoune help me?
I have an intranet which have RTF fields I store the content in ntext fields. There are also pictures in it reference to a record in the database like:

/special/binImgDocument.inc.asp?idSharedDocument=36234B15-8E76-47D6-A523-A281628D3F23

it's possible that a test can contain more than one of the above link (with different uniqueidentifiers).
Is it possible to "scan" every text field in off business hours to collect all uniqueidentifiers?

thank you
gumball_chAsked:
Who is Participating?
 
Aneesh RetnakaranDatabase AdministratorCommented:
You can make use of the full text indexing fascilty. Follow the steps



USE urDatabase
1. sp_fulltext_database 'enable'


2. sp_fulltext_table [ @tabname = ] 'qualified_table_name'
    , [ @action = ] 'action'
    [ , [ @ftcat = ] 'fulltext_catalog_name'
    , [ @keyname = ] 'unique_index_name' ]


3. Once u have done all these Use 'CONTAINS' Statement to do the search


SELECT Something
FROM urTable
WHERE CONTAINS(urIndexedColumnName, ' "String to seach " ')
GO
0
 
gumball_chAuthor Commented:
the link clould be like that:

<img src="/special/binImgDocument.inc.asp?idSharedDocument=36234B15-8E76-47D6-A523-A281628D3F23">
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>I have an intranet which have RTF fields I store the content in ntext fields.
if you only store web calls like this, don't use NTEXT but NVARCHAR instead, because searching in NTEXT will be quite difficult....

where yourfield like '%' + cast(uniqueidentifiervalue as varchar(50)) + '%'
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.