[Jooq][Oracle Built-in functions] Regexp_instr()

17 views
Skip to first unread message

Walid CHAIB

unread,
Apr 23, 2021, 4:04:22 AM4/23/21
to jooq...@googlegroups.com
Hi Lukas,

I hope you are doing well.
I wonder if Jooq needs a specific parameter to parse this function Regexp_instr().
Because when i execute this request on Postgresql via Jooq.

SELECT
CASE
WHEN c.masq_comp = 'Date' THEN
CASE
WHEN regexp_instr(i.LIGN_RIS, '[0-3][0-9]/[0-1][0-9]/[1-2][0|9][0-9]{2}')= 1 THEN to_char(to_date(i.LIGN_RIS, 'DD/MM/YYYY'), 'dd/mm/yyyy')
WHEN regexp_instr(i.LIGN_RIS, '[0-3][0-9]-[0-1][0-9]-[1-2][0|9][0-9]{2}')= 1 THEN to_char(to_date(i.LIGN_RIS, 'DD-MM-YYYY'), 'dd/mm/yyyy')
WHEN regexp_instr(i.LIGN_RIS, '[1-2][0|9][0-9]{2}-[0-1][0-9]-[0-3][0-9]')= 1 THEN to_char(to_date(i.LIGN_RIS, 'YYYY-MM-DD'), 'dd/mm/yyyy')
WHEN regexp_instr(i.LIGN_RIS, '[1-2][0|9][0-9]{2}[0-1][0-9][0-3][0-9]')= 1 THEN to_char(to_date(i.LIGN_RIS, 'YYYYMMDD'), 'dd/mm/yyyy')
ELSE i.LIGN_RIS
END
ELSE i.LIGN_RIS
END LIGN_RIS, c.TABL_COMP
FROM RISQUE i
INNER JOIN COMPOSANTWEB c ON
c.CD_COMP = i.CD_COMP
WHERE i.id_pol =:IDPOL
AND c.tabl_comp LIKE 'RISQUE.%'

I get an exception caused by the regexp_instr() function.

Thanks in advance,
Walid


Lukas Eder

unread,
Apr 23, 2021, 4:12:52 AM4/23/21
to jOOQ User Group
Hi Walid,

Thanks for your message. We don't support that function yet. I've added it to the feature request here, which was about REGEX_SUBSTR():

You'll have to implement support in your ParseListener implementation for now

Thanks,
Lukas

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAOP4Xxjv0PrQdaiUM622G8NVbEyWrooicakc0PCw-EQP9fUFvg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages