RE: LIKE work around??
...uhm duh. My apologies. I had the LIKE switched around when I tried it and after reading through the manual and not finding anything about LIKE (it isn't mentioned as a parameter in the SELECT section) I assumed it wasn't supported. Thanks for your comments. Aaron =20 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:12 PM To: Rutledge, Aaron Cc: Mysql List (E-mail) Subject: Re: LIKE work around?? Work-around? LIKE should work just fine... mysql select * from fruits where fruit_name like '%banana%'; On Thu, 7 Feb 2002, Rutledge, Aaron wrote: I am trying to query the database for records that have the same sequence of starting characters--such as banana1 and banana2 and have a result set returned that contains everything that starts with banana. Any way to do this? I think I would use LIKE in other types of databases, but I was wondering if there was a work around for MySQL. Thanks, Aaron - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
Paul DuBois writes: At 12:50 -0800 2/7/02, Cindy wrote: Rutledge, Aaron writes: MySQL doesn't support LIKE does it? I got an error when I tried. I use it all the time. Maybe post the error message you got. RLIKE on the other hand...sigh. sigh, what? RLIKE works. It's the same as REGEXP. I posted about it previously, but got no response: http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:92816 --Cindy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
At 12:50 -0800 2/7/02, Cindy wrote: Rutledge, Aaron writes: MySQL doesn't support LIKE does it? I got an error when I tried. I use it all the time. Maybe post the error message you got. RLIKE on the other hand...sigh. sigh, what? RLIKE works. It's the same as REGEXP. --Cindy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
Work-around? LIKE should work just fine... mysql select * from fruits where fruit_name like '%banana%'; On Thu, 7 Feb 2002, Rutledge, Aaron wrote: I am trying to query the database for records that have the same sequence of starting characters--such as banana1 and banana2 and have a result set returned that contains everything that starts with banana. Any way to do this? I think I would use LIKE in other types of databases, but I was wondering if there was a work around for MySQL. Thanks, Aaron - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: LIKE work around??
MySQL doesn't support LIKE does it? I got an error when I tried. =20 -Original Message- From: Nathan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:04 PM To: Rutledge, Aaron Subject: Re: LIKE work around?? Um... keep using LIKE? Just a thought... :-) - Original Message -=20 From: Rutledge, Aaron [EMAIL PROTECTED] To: Mysql List (E-mail) [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 12:56 PM Subject: LIKE work around?? I am trying to query the database for records that have the same sequence of starting characters--such as banana1 and banana2 and have a result set returned that contains everything that starts with banana. Any way to do this? I think I would use LIKE in other types of databases, but I was wondering if there was a work around for MySQL. Thanks, Aaron - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
Rutledge, Aaron writes: MySQL doesn't support LIKE does it? I got an error when I tried. I use it all the time. Maybe post the error message you got. RLIKE on the other hand...sigh. --Cindy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
Umm, I take it you haven't read the documentation? MySQL fully supports LIKE. Can you tell us the error you are getting? Along with the full query? j- k- On Thursday 07 February 2002 11:11, Rutledge, Aaron wrote: MySQL doesn't support LIKE does it? I got an error when I tried. -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
input is SELECT dog_name FROM hold_tbl WHERE dog_name RLIKE ^sam[0123456789]* ORDER BY dog_name (and then printing out each of the matches made) Sam Sam4 Sam5 Sammie6 Sammy7 Sampson2 Samson Samuel As I understand it, only the first three should have matched. Actually, as I really understand it none of them should have matched because REGEXP/RLIKE are case sensitive searches. It makes no difference if I use REGEXP instead of RLIKE. Also, I couldn't find any indication that mysql's regexp understood [0-9] as opposed to [0123456789], am I correct? Again, it makes no difference if I try that notation. Thanks, The query you want is dog_name RLIKE ^sam[0123456789]*$ Each of the above matches sam at the beginning folowed by ZERO or more numbers. If you put a $ at the end. It anchors to the end of the string like ^ anchors to the beginning. --Cindy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: LIKE work around??
You don't want to use LIKE in mysql - or have you not read about LIKE in the fine mysql manual?? If you use LIKE you will also need to use a % sign signify which bit is the variable bit. This is because mysql allows you to say if the variable bit is at the start or the end or both. LIKE 'banana%' would give you what you want, but it sounds like you should read the manual a bit more. cheers, noel On Friday, February 08, 2002 6:56 AM, Rutledge, Aaron [SMTP:[EMAIL PROTECTED]] wrote: I am trying to query the database for records that have the same sequence of starting characters--such as banana1 and banana2 and have a result set returned that contains everything that starts with banana. Any way to do this? I think I would use LIKE in other types of databases, but I was wondering if there was a work around for MySQL. Thanks, Aaron - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: LIKE work around??
SELECT * FROM Table WHERE Fruit LIKE banana% Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Rutledge, Aaron [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:56 PM To: Mysql List (E-mail) Subject: LIKE work around?? I am trying to query the database for records that have the same sequence of starting characters--such as banana1 and banana2 and have a result set returned that contains everything that starts with banana. Any way to do this? I think I would use LIKE in other types of databases, but I was wondering if there was a work around for MySQL. Thanks, Aaron - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: LIKE work around??
MySQL doesn't support LIKE does it? I got an error when I tried. -Original Message- From: Nathan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:04 PM To: Rutledge, Aaron Subject: Re: LIKE work around?? Um... keep using LIKE? Just a thought... :-) - Original Message - From: Rutledge, Aaron [EMAIL PROTECTED] To: Mysql List (E-mail) [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 12:56 PM Subject: LIKE work around?? I am trying to query the database for records that have the same sequence of starting characters--such as banana1 and banana2 and have a result set returned that contains everything that starts with banana. Any way to do this? I think I would use LIKE in other types of databases, but I was wondering if there was a work around for MySQL. Thanks, Aaron - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
Work-around? LIKE should work just fine... mysql select * from fruits where fruit_name like '%banana%'; On Thu, 7 Feb 2002, Rutledge, Aaron wrote: I am trying to query the database for records that have the same sequence of starting characters--such as banana1 and banana2 and have a result set returned that contains everything that starts with banana. Any way to do this? I think I would use LIKE in other types of databases, but I was wondering if there was a work around for MySQL. Thanks, Aaron - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: LIKE work around??
...uhm duh. My apologies. I had the LIKE switched around when I tried it and after reading through the manual and not finding anything about LIKE (it isn't mentioned as a parameter in the SELECT section) I assumed it wasn't supported. Thanks for your comments. Aaron -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:12 PM To: Rutledge, Aaron Cc: Mysql List (E-mail) Subject: Re: LIKE work around?? Work-around? LIKE should work just fine... mysql select * from fruits where fruit_name like '%banana%'; On Thu, 7 Feb 2002, Rutledge, Aaron wrote: I am trying to query the database for records that have the same sequence of starting characters--such as banana1 and banana2 and have a result set returned that contains everything that starts with banana. Any way to do this? I think I would use LIKE in other types of databases, but I was wondering if there was a work around for MySQL. Thanks, Aaron - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
Umm, I take it you haven't read the documentation? MySQL fully supports LIKE. Can you tell us the error you are getting? Along with the full query? j- k- On Thursday 07 February 2002 11:11, Rutledge, Aaron wrote: MySQL doesn't support LIKE does it? I got an error when I tried. -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
Rutledge, Aaron writes: MySQL doesn't support LIKE does it? I got an error when I tried. I use it all the time. Maybe post the error message you got. RLIKE on the other hand...sigh. --Cindy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
At 12:50 -0800 2/7/02, Cindy wrote: Rutledge, Aaron writes: MySQL doesn't support LIKE does it? I got an error when I tried. I use it all the time. Maybe post the error message you got. RLIKE on the other hand...sigh. sigh, what? RLIKE works. It's the same as REGEXP. --Cindy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
Paul DuBois writes: At 12:50 -0800 2/7/02, Cindy wrote: Rutledge, Aaron writes: MySQL doesn't support LIKE does it? I got an error when I tried. I use it all the time. Maybe post the error message you got. RLIKE on the other hand...sigh. sigh, what? RLIKE works. It's the same as REGEXP. I posted about it previously, but got no response: http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:92816 --Cindy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LIKE work around??
input is SELECT dog_name FROM hold_tbl WHERE dog_name RLIKE ^sam[0123456789]* ORDER BY dog_name (and then printing out each of the matches made) Sam Sam4 Sam5 Sammie6 Sammy7 Sampson2 Samson Samuel As I understand it, only the first three should have matched. Actually, as I really understand it none of them should have matched because REGEXP/RLIKE are case sensitive searches. It makes no difference if I use REGEXP instead of RLIKE. Also, I couldn't find any indication that mysql's regexp understood [0-9] as opposed to [0123456789], am I correct? Again, it makes no difference if I try that notation. Thanks, The query you want is dog_name RLIKE ^sam[0123456789]*$ Each of the above matches sam at the beginning folowed by ZERO or more numbers. If you put a $ at the end. It anchors to the end of the string like ^ anchors to the beginning. --Cindy - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php