home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!ingres!kerry
- From: kerry@Ingres.COM (Kerry Kurasaki)
- Newsgroups: comp.databases.ingres
- Subject: Re: SQL 'like' command with case insensitivity?
- Message-ID: <1992Aug12.173714.17470@pony.Ingres.COM>
- Date: 12 Aug 92 17:37:14 GMT
- References: <1992Aug12.002043.1970@candle.uucp>
- Reply-To: kerry@Ingres.COM (Kerry Kurasaki)
- Organization: Ask Computer Systems Inc., Ingres Division, Alameda CA 94501
- Lines: 26
-
- In article <1992Aug12.002043.1970@candle.uucp> root@candle.uucp (Bruce Momjian) writes:
- >I need to do an SQL statement where I need pattern matching that is
- >case-insensitive. In both SQL and 4GL, this statement is illegal:
- >
- > select *
- > from tablea
- > where uppercase(col) like '%YES%';
- >
- >It complains about the 'like'. I have called Ingres. The tech first
- >thought it was an easy solution, then he talked to some people and
- >basically says it's a limitation.
- >
- >The only two workarounds I can think of are to add another column that
- >always has 'col' as uppercase, or in 4GL to attach a block of code to
- >the select and for every row, uppercase the field, and then compare with
- >a select.
- >
-
- Unfortunately, the grammar for the LIKE predicate is:
-
- <column name> LIKE <expression>
-
- Another method is to create a view with the uppercase() function.
- You will not be able to update it though.
-
- Kerry
-