SemanticException Error in parsing error when executing the following sql
select clr.id,clr.customer_id,clr,contract_code,clr.core_asset_request_id,wa.user_id --,u.name from zcfw_sda.sda03_asset_info clr left join qz_sda.sda03_withdraw w on clr.contract_code = w.contract_no and w.etl_tx_dt = ${v_dt2num} left join qz_sda.sda03_withdraw_apply wa on w.withdraw_apply_no = wa.withdraw_apply_no and wa.etl_tx_dt = ${v_dt2num} --left join qz_sda.sda03_user u --on wa.user_id = u.id --and u.etl_tx_dt = ${v_dt2num} where clr.etl_tx_dt =20191103 and to_date(clr.loan_time) ='2019-11-03' and clr.contract_code='2191103751278446'
Error message:
English translation is semantic parsing error,
Under the alias is checked back in hql in. Carelessly written, resulting in an error.
Correct wording:
select clr.id,clr.customer_id,clr.contract_code,clr.core_asset_request_id,wa.user_id --,u.name from zcfw_sda.sda03_asset_info clr left join qz_sda.sda03_withdraw w on clr.contract_code = w.contract_no and w.etl_tx_dt = ${v_dt2num} left join qz_sda.sda03_withdraw_apply wa on w.withdraw_apply_no = wa.withdraw_apply_no and wa.etl_tx_dt = ${v_dt2num} --left join qz_sda.sda03_user u --on wa.user_id = u.id --and u.etl_tx_dt = ${v_dt2num} where clr.etl_tx_dt =20191103 and to_date(clr.loan_time) ='2019-11-03' and clr.contract_code='2191103751278446'