SSMS-无法绑定多部分标识符

时间:2018-06-19 02:46:27

标签: sql-server-2008 ssms

select ci.client_code, ci.cardid,cs.CLIENT_SUIT_ID, cs.EXPIRE_DATE
from client_info ci 
inner join client_info cio on ci.cardid = cio.cardid and cio.client_code like '090%'
inner join client_suit cs on ci.client_code = cs.CLIENT_CODE and cs.EXPIRE_DATE > getdate()
where ci.client_code not like '080%' and ci.client_code not like '090%'

BEGIN TRAN
    update dbo.CLIENT_SUIT_LINE
    set dbo.CLIENT_SUIT_LINE.CLIENT_SUIT_ID = dbo.CLIENT_SUIT.CLIENT_SUIT_ID
    from dbo.CLIENT_SUIT_LINE, dbo.CLIENT_SUIT
    where CLIENT_SUIT.EXPIRE_DATE > getdate() and ci.client_code not like '080%' and ci.client_code not like '090%'
ROLLBACK

我正在尝试在其行的过期日期超过今天日期时更新我的​​CLIENTSUIT_ID,并且它不能以080或090开头。我目前遇到的问题是“多部分标识符”ci。 client_code“无法绑定。

0 个答案:

没有答案