我有以下查询:
select vw.CONFERENCEID, alert.ALERTID, del.CHANNELID, del.DOCUMENTTEMPLATEID,
vw.starttime, vw.CONFERENCEID, alert.ALERTATTRIBUTEID,
alert.ALERTCATEGORYID, alert.ATTACHMENT, alert.ATTACHMENTLOCATION,
alert.ATTACHMENTNAME
from TBLMCONFERENCE vw,
TBLMSYSTEMALERTS alert,
TBLMALERTDELIVERYREL del,
tblmstandardmaster sm
WHERE alert.Alertid = del.alertid
and sm.masterid = del.CHANNELID
and alert.SYSTEMGENERATED = 'N'
and alert.alertid not in (
select sent.ALERTID
from TBLMSENTALERTHISTORY sent
where sent.REFACCOUNTID = vw.conferenceid
and sent.ALERTID = alert.ALERTID
and sent.CHANNELID = del.CHANNELID
and sent.RESETFLAG = 'N')
TBLMSENTALERTHISTORY
即使表中存在匹配记录,我也会获取记录。
这个查询有什么问题吗?