0
我收到错误“不明确的列名‘ClaimID的’为以下几点:不明确的列名错误SQL
USE ERSBI_Claims_Warehouse
GO
SELECT
ClaimID AS vClaimID,
DevelopmentTimeID AS vDevelopmentTimeID,
UnderwritingYear AS vUnderwritingYear,
IncurredClaimCount AS vIncurredClaimCount,
PaidClaimCount AS vPaidClaimCount,
EstimateClaimCount AS vEstimateClaimCount
FROM
FactClaimSnapshotbreakdownClaimCount as fcbscc
INNER JOIN ERSBI_Warehouse.dbo.FactClaimAccidentYear AS fcay
ON fcbscc.ClaimID = fcay.ClaimID
WHERE
fcbscc.BreakdownIntermediateLevel = 'TPP'
AND UnderwritingYear > 2013
我很新但到SQL我想我已经包括了所有相关的表名。有人能告诉我我要去哪里吗?谢谢你在前进
你应该总是包括别名的习惯得到列的前面在您的查询名称。它不仅可以消除这个问题,还可以让您更轻松地维护查询,因为您可以轻松查看某个列属于哪个表。 –