MySQL Forums
Forum List  »  Newbie

Re: Regexp, replace ??? what do I need to use
Posted by: Sandra Rascheli
Date: February 06, 2007 10:51AM

Hello Felix, the query seems to work fine except on a few occasions which I am trying to understand what it does because it generates the new number

SELECT identification, GROUP_CONCAT(SUBSTRING(identification, i, 1) ORDER BY i SEPARATOR '')
FROM clientstemporal
JOIN ints ON i BETWEEN 1 AND LENGTH(identification)
WHERE
SUBSTRING(identification, i, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
GROUP BY identification;

partial result:
72522084 | 7722552222008844

this seems to happen randomly I suppose because it only happens to some particular numbers as in this example.
What could be the problem with the query?
Many thanks for your help.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.