Thanks so much Lukas for your help.
I really appreciate your assistance,
I have a weird issue :
When i concatenate(using the double pipe ||) null with a string in oracle returns the string, but in postgresql it returns null
I tried to design a regex pattern to replace || with the function concat because it returns the desired result (concat (string , null ) = string) but Jooq parse it into the double pipe operator so I am stuck at the same issue of null result.
You can see the request in the oracle dialect :
select NOM || chr(9)|| NUM_PER || chr(9)|| TYPE_PER || chr(9)|| ADRESSE1_ADR || chr(9)|| ADRESSE2_ADR || chr(9)|| CD_PST || chr(9)|| VILLE_ADR || chr(9)|| CD_CATEG || chr(9)|| SITE || chr(9)|| FONCT || chr(9)|| ID_PER || chr(9)|| EMAIL_PER || chr(9)|| IMMAT_PER || chr(9)|| NOM2_PER || chr(9) AA
from (select CONCAT(CONCAT(p.nom_per, ' '), p.prenom_per) NOM, p.NUM_PER, p.type_per, a.ADRESSE1_ADR, a.ADRESSE2_ADR, a.cd_pst, a.VILLE_ADR , c.cd_categ, p.telport_per SITE, p.telprinc_per FONCT, p.id_per, p.email_per, p.immat_per, p.nom2_per
from PERSONNE p
inner join CATEGPER c on
p.id_per = c.ID_PER
left outer join ADRESSE a on
p.id_per = TO_NUMBER(a.IDTAB_ADR)
and a.TAB_ADR = 'PERSONNE'
and a.cd_cadr = 'PRINCENVOI'
where 1 = 1
and (upper(p.num_per) = :RECH1)
and (c.dtfaff_catp >= sysdate
or c.dtfaff_catp is null)
and cd_categ in (select cd_categ
from lesfiltres filt, utilisateur u
where filt.CD_GRP = u.cd_grp
and u.cd_util = 'IGA')
and (not exists(select 1
from dossier_multiniv dmn_
where dmn_.id_dossier = to_char(p.id_per)
and dmn_.type_dossier = 'PERSONNE')
or exists(select 1
from v_droits_multiniv vdmn_
where vdmn_.id_dossier = to_char(p.id_per)
and vdmn_.type_dossier = 'PERSONNE')));
I wonder if there's a fix for that ?
Thanks in advance.