Вопрос

I'm try to convert my Oracle function which contains SUBSTR() to PostgreSQL. Is there an equivalent function in PSQL? Thanks.

I manage to find a Oracle Instr() conversion to PostgreSQL.

Это было полезно?

Решение

You can use a code from Postgres documentation mentioned by michel-sim. Other possibility is Orafce extension - https://github.com/orafce/orafce or http://postgres.cz/wiki/Oracle_functionality_%28en%29 that is available for RedHat or Debian as binary package too.

Другие советы

There's substring, but you'd have to modify the invocations -- instead of substr(x, i, j) you need substring(x from i to j)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top