尝试执行 SQL SELECT 语句时出现以下错误
无法执行语句。 未找到相关名称“联系人” SQLCODE=-142,ODBC 3 状态“42S02” 第 1 行,第 1 列
我的代码如下
Select forename, surname, email, quotedate
From ( SELECT *, ROW_NUMBER() OVER (PARTITION BY tblQuote.contno ORDER BY quoteno DESC) AS rn
FROM dba.quotehdr as tblQuote left join dba.contact as tblContact on tblQuote.contno = tblContact.contno)q
where rn = 1 and quotedate <=today()-720 and emailbounced = 0 and email is not null and dba.contact.statusflag = 'A'
order by quotedate desc
此错误仅在我添加时发生
dba.contact.statusflag = 'A'
我试过这个
tblContact.statusflag = 'A'
我得到同样的错误!
有什么建议么?