If we try to filter one of these trace tables like this,
select * from TraceTable where TextData like '%value%'
That is fine, but if we try to do this,
select * from TraceTable where TextData = 'value'
We get an error like this,
The data types ntext and varchar are incompatible in the equal to operator.
The solution is this,
select * from TraceTable where cast(textdata as varchar(100)) = 'value'
No comments:
Post a Comment