Last active
February 21, 2017 00:17
-
-
Save gabidavila/6e806b52a06a7d4fb4431a49af7e6e5d to your computer and use it in GitHub Desktop.
This file contains 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
DELIMITER $$ | |
CREATE FUNCTION to_json_array(input_string TEXT, delimiter_char CHAR(1)) | |
RETURNS JSON | |
BEGIN | |
RETURN CONCAT("[", TRIM(BOTH delimiter_char FROM input_string), "]"); | |
END$$ | |
DELIMITER ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment