Last active
April 16, 2020 15:31
-
-
Save zonky2/013066a4e54c8a58c3aa3190a529b3de to your computer and use it in GitHub Desktop.
unpack uuid to UUID tl_files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# V1 Sven | |
LCASE(CONCAT_WS('-', | |
HEX(SUBSTR(uuid, 1, 4)), | |
HEX(SUBSTR(uuid, 5, 2)), | |
HEX(SUBSTR(uuid, 7, 2)), | |
HEX(SUBSTR(uuid, 9, 2)), | |
HEX(SUBSTR(uuid, 11)) | |
)) | |
# V2 Ingolf | |
LOWER(CONCAT( | |
LEFT(HEX(uuid), 8), | |
'-', MID(HEX(uuid), 9,4), | |
'-', MID(HEX(uuid), 13,4), | |
'-', MID(HEX(uuid), 17,4), | |
'-', RIGHT(HEX(uuid), 12)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment