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

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -