Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Search case sensitive ?

Status
Not open for further replies.

Oppenhiemer

Programmer
Jun 28, 2001
315
GB
Hi -

I was under the impression that SQL SQl searches were not case-sensitive. However, after running a query I find that apparently this is not the case. Here is an example of the SQL statement being executed :

SELECT * From tablename WHERE tablename.fieldname LIKE '%Sunday%';

Its the '%Sunday'% bit that seems to be case sensitive. The "Fieldname" in question is of type VARCHAR (50). I have not made any changes to the default behaviour of Interbase itself (so far as Im aware.)

The above statement will return the expected records. But changing the '%Sunday%' to
'%SUNDAY%' or some other form of case change - causes problems. I will point out that the data contained in the database is in the shape of "Sunday".


Anyway, any help would be much appreciated.

Cheers..

Opp.


 
You could do:


SELECT * From tablename
WHERE upper(tablename.fieldname) LIKE upper('%Sunday%');
 
Hi -

My question has been answered in another post - but thanks Stummel for taking time to reply.

Opp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top