SQL Server Msg 8114, Level 16, State 5, Line 2 Error converting data type [closed]

5w9g7ksd  于 2023-03-22  发布在  其他
关注(0)|答案(1)|浏览(133)

Closed. This question is not reproducible or was caused by typos . It is not currently accepting answers.

This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.

Closed yesterday.
Improve this question

Can you help me to do this view correctly?

code:

SELECT CustomerName, C_CUR, SUM(BILL_AMT) AS B_AMT, C_CODE
FROM     dbo.BILLS
WHERE  (BILL_TYPE = 2)
GROUP BY C_CODE, C_CUR, CustomerName
      UNION ALL
SELECT C_CODE, SUM(BILL_AMT) AS RT_AMT, C_CUR, CustomerName
FROM     dbo.RTN_BILLS
WHERE  (BILL_TYPE = 2)
GROUP BY C_CODE, C_CUR, CustomerName

error:

Msg 8114, Level 16, State 5, Line 2
Error converting data type nvarchar to float.

kq0g1dla

kq0g1dla1#

List the columns for both parts of the UNION in the same order.

相关问题