日期:2014-05-18  浏览次数:20376 次

这句话为什么出错呢?
insert into InterestReceive 
  select ContractNm,LoanBlankDate,Monthcapital,TotalInterest,RemainInterest,RemainPeriod,PeriodInterst,PeriodCapital,ExceedRate
  from InterestList a where LoanBlankDate=GETDATE()
  and not exists (select 1 from InterestReceive b
  where a.ContractNm=b.ContractNm and a.LoanBlankDate=b.LoanBlankDate and a.TotalInterest=b.TotalInterest and a.RemainInterest=b.RemainInterest
 and a.RemainPeriod=b.RemainInterest and a.PeriodInterst=b.PeriodInterst and a.PeriodCapital=b.PeriodCapital and a.ExceedRate=b.ExceedRate
)

我检查了好几遍了,为什么会出错呢?语法也没问题啊



消息 208,级别 16,状态 1,第 1 行
对象名 'InterestList' 无效。


------解决方案--------------------
from InterestList a where LoanBlankDate=GETDATE()
InterestList 已被你改为a了
------解决方案--------------------
探讨
from InterestList a where LoanBlankDate=GETDATE()
InterestList 已被你改为a了