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
| DROP FUNCTION IF EXISTS SPLIT; | |
| DROP FUNCTION IF EXISTS _SPLIT; | |
| DROP FUNCTION IF EXISTS RTSPLIT; | |
| DROP FUNCTION IF EXISTS LTSPLIT; | |
| DELIMITER // | |
| -- Simple Split (no trim) | |
| CREATE FUNCTION SPLIT(S CHAR(255), DELIM VARCHAR(30), S_INDEX TINYINT UNSIGNED) RETURNS VARCHAR(255) | |
| BEGIN | |
| RETURN _SPLIT(S, DELIM, S_INDEX, '', 0); |
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
| #!/usr/bin/ruby | |
| require 'rubygems' | |
| require 'optparse' | |
| require 'ostruct' | |
| # >> Helper functions | |
| # deep copy | |
| def dcopy(o) | |
| return Marshal.load(Marshal.dump(o)) |
NewerOlder