sql - How to split a string based on delimiter? -
i have column of variable length character strings end in .
i.e.
eu... eu eu. eeu. eeu... and want select entire string . not present, or string before first . get:
eu eu eu eeu eeu i aware of substr() function requires fixed positions given paramaters. can see not possible. can insert regex sql db2 statement?
you can try this:
db2 "select * test" test
eu...
eu
eu.
eeu.
eeu...
5 record(s) selected.
db2 "select replace(test, '.', '') test test" 1
eu
eu
eu
eeu
eeu
5 record(s) selected.
Comments
Post a Comment