select
t.*
,b.jyrq,b.jyqd,b.xzbz,b.jyje,b.jdfx,b.ye,b.dfzh,b.dfhm
from t_account_result t inner join t_notice n ON n.tzdbh = t.tzdbh
INNER JOIN t_everyday_bank_bill b ON b.lsh = t.yhlsh
where t.jzrq LIKE CONCAT('2022-05-10','%')
ERROR: operator does not exist: timestamp without time zone ~~ text
LINE 7: where t.jzrq LIKE CONCAT('2022-05-10','%')
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
解决办法:
select
t.*
,b.jyrq,b.jyqd,b.xzbz,b.jyje,b.jdfx,b.ye,b.dfzh,b.dfhm
from t_account_result t inner join t_notice n ON n.tzdbh = t.tzdbh
INNER JOIN t_everyday_bank_bill b ON b.lsh = t.yhlsh
where (TO_CHAR(t.jzrq, 'yyyy-MM-dd') LIKE CONCAT('2022-05-10'::date,'%'))