How to compare two Text fields using a query?
From: Danny Mansour (anonymous_at_discussions.microsoft.com)
Date: 06/11/04
- Next message: David Portas: "Re: How about cursors using table valued functions..."
- Previous message: James Travis: "RE: newb question:comparing columns"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 11 Jun 2004 08:41:40 -0700
Hi,
I have two tables T1 and T2 that have identical
structure, an Id field as int and a Description field as
text. The text fields contain large data.
The content of the table could be like this:
T1:
Id Description
1 text more than 8000 characters
T2
Id Description
1 some text
I want to compare the Description fields with a query as
such:
Select T1.Id FROM T1 INNER JOIN T2 on T1.Id = T2.Id
WHERE NOT T1.Description LIKE T2.Description
SQL server throws a "Data type mismatch - use the CONVERT
function." error message.
I can not use the convert function because I don't want
to downcast a text field to a varchar since my data is
larger than 8000 characters.
Is there any other ways to doing this using a query?
Please let me know if you have any ideas.
Thanks,
Danny
- Next message: David Portas: "Re: How about cursors using table valued functions..."
- Previous message: James Travis: "RE: newb question:comparing columns"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|