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.
1条答案
按热度按时间kq0g1dla1#
List the columns for both parts of the
UNION
in the same order.