On 30 Jun 2004 17:45:06 +0200, wrote: >In article <[EMAIL PROTECTED]>, >SGreen 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.
Thnx to all for this mysql primer, will let you know how it goes, but have been dragged off to another crisis zzapper (vim, cygwin, wiki & zsh) -- vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?" http://www.vim.org/tips/tip.php?tip_id=305 Best of Vim Tips -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]