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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Comparison of Text Fields

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-12 : 22:24:16
Stuart writes "I have two text fields that represent a before and after state. How do I compare them for differences?

I can not actually state an update clause with

[table1].[text1] != [table2].[text2]

So I did a convert from a text to a varchar

convert(varchar(7500),text1) != convert(varchar(7500),text2)

My problem is obviously the specified lengths! A text field can hold far more than 7500 chars of data. It is quite possible that changes to the text fields would not be picked up if the cast was to truncate the text field in the convert.

Unfortunately its one of those situations where the requirements seem to exceed the design.

Regards

Stuart"
   

- Advertisement -