Created
March 2, 2011 20:25
-
-
Save iampeterbanjo/851667 to your computer and use it in GitHub Desktop.
using regular expressions in sql
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
SELECT NEW_LINE_INDEX | |
FROM ( | |
SELECT INSTR(value, "\n") | |
AS NEW_LINE_INDEX | |
FROM table | |
WHERE value != "" | |
ORDER BY value | |
) findNewLines | |
WHERE NEW_LINE_INDEX > 0 | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment