Skip to content

Instantly share code, notes, and snippets.

@wwwy3y3
Created October 25, 2023 09:55
Show Gist options
  • Save wwwy3y3/c8b483c776ee81f5b85a0a28a6e1c1ea to your computer and use it in GitHub Desktop.
Save wwwy3y3/c8b483c776ee81f5b85a0a28a6e1c1ea to your computer and use it in GitHub Desktop.
oracle
SELECT
'U+' || TO_CHAR(TO_NUMBER(UNICODE(TO_NCHAR(REGEXP_SUBSTR(my_column, '.', 1, LEVEL)))), 'FMXXXX')
AS unicode_str
FROM my_table
CONNECT BY PRIOR dbms_random.value IS NOT NULL
AND PRIOR my_column = my_column
AND PRIOR sys_guid() IS NOT NULL
AND LEVEL <= LENGTH(my_column);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment