Reputation: 538
I'm using PostgreSQL and I need to truncate a text string, I need to show from an escape character (:) onwards.
I'm trying something like that:
SELECT SUBSTRING ('CATEGORIA DE TRABAJOS: EJECUTIVO' FROM '%#":#"%' FOR '#');
Upvotes: 1
Views: 294
Reputation: 51406
t=# select split_part('CATEGORIA DE TRABAJOS: EJECUTIVO',':',2);
split_part
------------
EJECUTIVO
(1 row)
just split by first found delimiter?..
Upvotes: 1