"Boris Mueller" <[EMAIL PROTECTED]> wrote: > > I need to do a LOCATE(substr,str,pos) request where pos must be taken from a > column. > for unknown reason (bug?) it does not work. > I made the following example to ilustrate the problem: > > select ERW, locate('xyz', A, 3000) as loc1, locate('xyz', A, ERW) as loc2 > from B; > > +------+---------+--------+ > | ERW | loc1 | loc2 | > +------+---------+--------+ > | 2873 | 10363 | 0 | > | 2677 | 18027 | 0 | > | 2459 | 13016 | 0 | > | 2539 | 3462 | 0 | > +------+---------+--------+ > 4 rows in set (0.00 sec) > > in this example loc2 should have the same result as loc1, but loc2 always > presents 0. > > whats going wrong here? > anyone can help? > > I have mysql 4.0.18 on redhat 9.0. > ERW is a mediumint(8) unsigned not null >
Could you create a test case? I wasn't able to repeat it with my test data. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]