Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

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
0
gumball_ch
Asked:
gumball_ch
2 Solutions
 
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
 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now