Hi

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

Regards
Boris

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to