From: Brian Candler Date: 2003-06-03T03:30:18+09:00 Subject: Re: [OT] Re: Metakit for Ruby - Would you want it? On Mon, Jun 02, 2003 at 06:41:38AM +0900, Nospam wrote: > Brian Candler wrote: > >- In Oracle, "like" is case-sensitive (only) > >- In Sqlite, "like" is case-insensitive (only) > >- In Mysql, you have the choice of "like" or "ilike" operators > > > >It's pretty much impossible to layer consistent semantics on top of all > >three databases. I have had to approximate. In the case of Oracle, I have > >to > >issue queries of the form > > > > "foo like ? or foo like ? or foo like ? or foo like ?", > > var, var.downcase, var.upcase, var.capitalize > > I know this is offtopic, but you could probably use "UPPER(foo) LIKE > UPPER(?)" on all 3 databases... :) Thanks, not a bad idea, although I imagine that Oracle would not use the indexes at all in that case, which for a million-record database is a bit of a problem. What I'd really like is foo RLIKE '[hH][eE][lL][lL][oO]' (which I think mysql has, but I couldn't find anything in Oracle like that) Cheers, Brian.