Constantin Teodorescu wrote:
>
> Hannu Krosing wrote:
> >
> > Constantin Teodorescu wrote:
> > >
> > > Is there for PostgreSQL a modifier(parameter) that will make the LIKE
> > > clause case insensitive ?
> >
> > Maybe
> >
> > select * from t where lower(name) like 'john%';
>
> Yes, it may work, but probably lower(name) won't work on ODBC->MS Access
> ...
It is much more likely to work than ~* , the case-insensitive regex op.
But to make it use indexes (for the exact case above) you should also create
index on lower(name).
> I would like to preserve also the SQL commands betwen versions and not
> to fill my program with IF's ..
I doubt that case-insensitive like is in any standard.
Could someone look it up in SQL92 spec ?
------------
Hannu