Skip to content
Snippets Groups Projects
Commit 84e79196 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX #5207 fix order by identifier

parent a918e9b9
No related branches found
No related tags found
No related merge requests found
-- *************************************************************************--
-- --
-- --
-- THIS SCRIPT IS USE TO PASS FROM MAARCH 1.5 TO MAARCH 1.5.1 --
-- --
-- --
-- *************************************************************************--
CREATE FUNCTION order_alphanum(text) RETURNS text AS $$
SELECT regexp_replace(regexp_replace(regexp_replace(regexp_replace($1,
E'(^|\\D)(\\d{1,3}($|\\D))', E'\\1000\\2', 'g'),
E'(^|\\D)(\\d{4,6}($|\\D))', E'\\1000\\2', 'g'),
E'(^|\\D)(\\d{7}($|\\D))', E'\\100\\2', 'g'),
E'(^|\\D)(\\d{8}($|\\D))', E'\\10\\2', 'g');
$$ LANGUAGE SQL;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment