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)
 case sensive comparisons on TEXT field

Author  Topic 

mikefaulkner
Starting Member

1 Post

Posted - 2002-02-20 : 20:10:35
I need to make a case-insensitive comparision on a TEXT field on an SQL Server 7 that was setup with case-sensitive as the default. (grrrr..)

I can't do:
select * from mytable where upper(TEXTfield) like upper(@otherparameter)

Any ideas?

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2002-02-20 : 20:38:07
quote:

I can't do:
select * from mytable where upper(TEXTfield) like upper(@otherparameter)



can you explain why you can't do this?

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-02-20 : 21:02:25
Because UPPER doesn't work with text columns. I think the only function that definitely works with text columns is PatIndex. I think CharIndex will work too in some cases, but those are really the only ones, and neither of them help you. The best you can do is to try CONVERTing the text column to varchar, otherwise all bets are off.

Go to Top of Page
   

- Advertisement -