我有一個具有以下字段的表:多部分標識符「IncomeExpenses.OperationId」無法綁定
OperationID,
Date,
TotalExpenses,
TotalIncome
我使用下面的SQL查詢來獲取基於TotalExpenses
和TotalIncome
之間的區別指定OperationID
:
select
(select (Date) from IncomeExpenses)
,(select (totalincome) from IncomeExpenses)
-(select (totalexpenses) from IncomeExpenses)
where IncomeExpenses.OperationId ='1'
但是我得到這個錯誤:
The multi-part identifier "IncomeExpenses.OperationId" could not be bound
我可能會做錯什麼?
謝謝你,這對我有效 –