本文介绍了当我运行以下查询时,我得到此错误“联合类型文本和Bigint不能匹配“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SELECT
1 AS STEP
,'' AS ProviderName
,'' AS Procedurecode
,Claimid
,Patient_First_Name
,Patient_Last_Name
,DOS
,SUM(COALESCE(Total_Charge,0))
,SUM(COALESCE(PaidAmount,0))
,PostedDate
,CheckEFTDate
,CheckEFTNo
FROM table_name
GROUP BY ProviderName,Claimid,Patient_First_Name,Patient_Last_Name,DOS,PostedDate,CheckEFTDate,CheckEFTNo
UNION ALL
SELECT
2 AS STEP
,'' AS ProviderName
,'' AS Procedurecode
,COUNT(Claimid)
,'' AS Patient_First_Name
,'' AS Patient_Last_Name
,NULL::date AS DOS
,SUM(COALESCE(Total_Charge,0))
,SUM(COALESCE(PaidAmount,0))
,NULL::date AS PostedDate
,NULL::date AS CheckEFTDate
,'' AS CheckEFTNo
FROM table_name GROUP BY Claimid
推荐答案
这篇关于当我运行以下查询时,我得到此错误“联合类型文本和Bigint不能匹配“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!