From: Peter Brawley Date: March 13 2006 4:16pm Subject: Re: Help regarding a simple query List-Archive: http://lists.mysql.com/mysql/195729 Message-Id: <44159AE7.3010509@earthlink.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=======AVGMAIL-44159AE856E6=======" --=======AVGMAIL-44159AE856E6======= Content-Type: multipart/alternative; boundary=------------050207040307070909060607 --------------050207040307070909060607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Now i need to get all the records which consists of the string venu(case should not be considered either case should be).i.e i should get 1,2,3,4,5,8 records A simple way is ... ... WHERE LOCATE('venu', col_name ) > 0 ... or if the column is [VAR]BINARY, LOCATE('venu',CAST(col_name AS CHAR)) for case insensitivity. PB ----- VenuGopal Papasani wrote: > Hi, > I am searching for a query where i can have pattern matching without > considering the cases.You can consider the following example for detailed > description of what i want exactly. > > Let my table X consists of following data > Name > ------------------- > venu > venup > venugopla > VenugOpal > VENU > papasani > papasni > pvenu > Now i need to get all the records which consists of the string > venu(case should not be considered either case should be).i.e i should get > 1,2,3,4,5,8 records > I will be very much thankful if any of you give me the query for this. > > Thanks in Advance, > > Regards, > venu. > (sorry for my poor English) > > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006 > --------------050207040307070909060607 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Now i need to get all the records which consists of the string venu(case should not be considered either case should be).i.e i should get 1,2,3,4,5,8 recordsA simple way is ...
--------------050207040307070909060607-- --=======AVGMAIL-44159AE856E6======= Content-Type: text/plain; x-avg=cert; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-Description: "AVG certification" No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006 --=======AVGMAIL-44159AE856E6=======--Hi, I am searching for a query where i can have pattern matching without considering the cases.You can consider the following example for detailed description of what i want exactly. Let my table X consists of following data Name ------------------- venu venup venugopla VenugOpal VENU papasani papasni pvenu Now i need to get all the records which consists of the string venu(case should not be considered either case should be).i.e i should get 1,2,3,4,5,8 records I will be very much thankful if any of you give me the query for this. Thanks in Advance, Regards, venu. (sorry for my poor English)
No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006