Re: SQL - like vs matches
Posted in 1992
Topics: General Discussion
...and 'MATCHES' can be used to get around the case-dependency of queries, so it is quite useful. ---(Forwarded from: walt@mathcs.emory.edu, Dated: Sat, 21 Mar 92 09:05:36 EST)--- Received: from rmy.rmy.emory.edu by um.cc.umich.edu via Internet with TCP; Sat, 21 Mar 92 10:30:46 EST Received: from csslc.rmy.emory.edu by rmy.rmy.emory.edu (5.65/Emory_rmy.3.2.6) via SMTP id AA07928 ; Sat, 21 Mar 92 10:30:47 -0500 Received: from emory.mathcs.emory.edu by rmy.rmy.emory.edu (5.65/Emory_rmy.3.2.6) via SMTP id AA05321 ; Sat, 21 Mar 92 09:05:38 -0500 Received: by emory.mathcs.emory.edu (5.65/Emory_mathcs.3.3.3) via MAILPROG id AA18535 ; Sat, 21 Mar 92 09:05:36 -0500 Return-Path: walt@mathcs.emory.edu Date: Sat, 21 Mar 92 09:05:36 -0500 From: walt@mathcs.emory.edu (Walt Hultgren {rmy}) Message-Id: <9203211405.AA18535@emory.mathcs.emory.edu> To: informix-news-gate@rmy Subject: Re: SQL - like vs matches X-Informix-List-Id: <newsgate.922> Path: emory!samsung!nighthawk.clearpoint.com!transfer!m2c!nic.umass.edu!caen!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!sun!amdcad!weitek!pyramid!infmx!news From: cortesi@informix.com (David Cortesi) Newsgroups: comp.databases.informix Message-ID: <1992Mar20.013508.22861@informix.com> Date: 20 Mar 92 01:35:08 GMT References: <624@shaman.wv.tek.com> Sender: news@informix.com (Usenet News) Reply-To: cortesi@informix.com Organization: Informix Software, Inc. In article <624@shaman.wv.tek.com> halj@hollywood.WV.tek.COM (Hal Jones) writes: > Ok maybe this is silly but I've only used the "MATCHES" keyword in SQL. Today > while I was trying to answer an end-user question I noticed the "LIKE" keyword. > So my question is when should you use one over the other? From what I can tell > they perform the same function just slightly different with "MATCHES" providing > more flexibility with ranges. One difference: LIKE is in the ANSI standard and MATCHES is not. Another: MATCHES supports unix-style classes [a-z]; LIKE does not.