Harold, THANK YOU!! As I was writing that bit of code I had that creepy feeling that "knew" that I was overlooking something simple. I guess I win the "D'OH" prize for today. 8-D. (Maybe I shouldn't write any more SQL until *after* the coffee kicks in......hmmm...)
Nice catch! Shawn Harald Fuchs <[EMAIL PROTECTED] To: [EMAIL PROTECTED] .net> cc: Sent by: news Fax to: <[EMAIL PROTECTED] Subject: Re: Using REGEXP rg> 06/30/2004 11:45 AM Please respond to hf517 In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes: > SELECT t1.* > FROM ytbl_development t1 > INNER JOIN tmpShortCodes sc > ON INSTR(t1.txtDevPostCode, sc.short_code) =1 This is the same as SELECT t1.* FROM ytbl_development t1 INNER JOIN tmpShortCodes sc ON t1.txtDevPostCode LIKE concat(sc.short_code, '%') and this query would use indexes on txtDevPostCode and short_code. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]