I have this code in oracle PLSQL:
select * from con_transaccioncabecera c
where c.cab_estadocon in
(select regexp_substr('S-C-I-A','[^-]+',1,level) from dual
connect by regexp_substr('S-C-I-A','[^-]+',1,level) is not NULL)
I typed the string 'S-C-I-A', but actually, there would go a variable.
I need an equivalent in plpgsql.