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)
 Searching case sensitive data

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-11 : 21:41:40
Pete writes "Hi!

My question is:

How do you search for a specific character in a field that contains both upper and lower case characters?

Details:

I have a database field called ABCS. The value for one of the records is DFh2AcZ. The value for another record is dHZ3.

By using the following SQL code I get both records:

SELECT * FROM [table]
WHERE abcs LIKE '%h%'


I only want the record with the lower case h in it. Not the one with the upper case H.

If the field was a single character field, I'd use the unicode function. But that won't work with a field more that 1 character in length.

Do you have any ideas? I am using Windows NT 4 Server SP6a and SQL Server 7 SP 3.

Thanks!"
   

- Advertisement -