I want to make a postgresql query which removing characters. For example, my datas are like this;
John Smith https://john.smith.com
Allen Paul https://allen.paul.com
I want to remove characters which start with https. I want to see in the final like this;
John Smith
Allen Paul
Can anybody help me. Thanks...
1 Answer 1
split_part is good for this:
t=# select split_part('Allen Paul https://allen.paul.com',' https://',1);
split_part
------------
Allen Paul
(1 row)
Time: 1.370 ms
answered Apr 25, 2017 at 8:15
Vao Tsun
52.5k13 gold badges114 silver badges150 bronze badges
Sign up to request clarification or add additional context in comments.
1 Comment
Halim
That's it! Thank you soo much.
lang-sql