0
I am trying to make a query with CONCAT, Seto the values I wish only that returns syntax error
SQL Error [42601]: ERRO: erro de sintaxe em ou próximo a ":"
Position: 683
select processador.cd_code,
endereco.ds_address,
rdo.nm_lane,
rdo.dt_record_pass,
rdo.ds_license_plate,
rdo.vl_speed|| ' Km/h' velocidade
from tbgen_rdo rdo
INNER JOIN tbgen_processor processador ON rdo.id_processor = processador.id_processor
INNER JOIN ( select lane.nm_lane,
dctosProc.id_general_processor,
lane.ds_address
from tbdctos4x_processor dctosproc
inner join tbdctos4x_lane lane ON lane.id_dctos_processor = dctosproc.id_dctos_processor
) as endereco
ON endereco.nm_lane = rdo.nm_lane AND endereco.id_general_processor = processador.id_processor
where rdo.dt_record_pass >= to_timestamp(CONCAT(concat($P{PARAM_FILTER_DATE_INI},' '), $P{PARAM_FILTER_HOUR_INI}),'DD/MM/YYYY HH24:MI:SS') and
rdo.dt_record_pass <= to_timestamp(CONCAT(concat($P{PARAM_FILTER_DATE_END},' '), $P{PARAM_FILTER_HOUR_END}),'DD/MM/YYYY HH24:MI:SS') and rdo.ds_license_plate <> '#######'
$P!{PARAM_WHERE_CLAUSE}
order by rdo.tbgen_rdo
Exclusively in Postgresql works perfectly:
teste=# SELECT to_timestamp(CONCAT(concat('15/01/2020',' '), '15:37:49'),'DD/MM/YYYY HH24:MI:SS');
gives as a result:to_timestamp 
------------------------
 2020-01-15 15:37:49-03
(1 registro)

.– anonimo
Poise, I discovered that actually it was not a syntax error but that the values returned in the variables were not in the format of the mask.
– Rorion Barros