Teradata SQL将十进制转换为bigint



我试图运行一个有3个内部连接的选择语句。最后一个连接是十进制到大整数的转换。我试着把小数转换成bigint;然而,我仍然得到这个错误:

准备时出错S1000(-3754)[Teradata][ODBC Teradata Driver]Teradata databasefloat类型常量或隐式转换期间的精度错误。(0.29秒)

这是我的查询。我不明白我做错了什么。有人能帮忙吗?
Select 
acct,
tramt,
TRINITDT,
trprocdt,
TRAN_CD,
TDDESC_1,
TDDESC_2,
MICM_TRAN_DESC,
LDGR_TYP_CD
from deposit.F_HRC_DPS_ACCT_TRAN_EOM as T
INNER JOIN customer.Cust_ACCT CA ON T.acct = CA.acct_NB 
inner join customer.CUST_IP_X_AR cipx on ca.cust_ar_id = cipx.cust_ar_id
inner join customer.cust c on Cast(cipx.cust_ip_id as bigint) = c.cust_ip_id
where Cast(cipx.cust_ip_id as int) in
(select top 50 Cast(cipx.cust_ip_id as bigint) from customer.cust)

update:我将内部连接更改为此。还是同样的错误

INNER JOIN customer.Cust_ACCT CA ON T.acct = CA.acct_NB 
inner join customer.CUST_IP_X_AR cipx on ca.cust_ar_id = cipx.cust_ar_id
inner join customer.cust c on CAST(CAST(cipx.cust_ip_id AS numeric (27,0)) AS bigint)= c.cust_ip_id
where CAST(CAST(cipx.cust_ip_id AS numeric (27,0)) AS bigint) in
(select top 50 CAST(CAST(cipx.cust_ip_id AS numeric (27,0)) AS bigint) from customer.cust)

使用CAST(CAST(column AS numeric (27,0)) AS bigint).

Select 
acct,
tramt,
TRINITDT,
trprocdt,
TRAN_CD,
TDDESC_1,
TDDESC_2,
MICM_TRAN_DESC,
LDGR_TYP_CD
from deposit.F_HRC_DPS_ACCT_TRAN_EOM as T
INNER JOIN customer.Cust_ACCT CA ON T.acct = CA.acct_NB 
inner join customer.CUST_IP_X_AR cipx on ca.cust_ar_id = cipx.cust_ar_id
inner join customer.cust c on CAST(CAST(cipx.cust_ip_id AS numeric(27,0)) AS bigint) = c.cust_ip_id
where CAST(CAST(cipx.cust_ip_id AS numeric(27,0)) AS bigint) in
(select top 50 CAST(CAST(cipx.cust_ip_id AS numeric(27,0)) AS bigint) from customer.cust)