Bob‘s SQL:
SELECT
NUMINDEX,STRITEMNO,NUMTYPE,STRMODELNAME,TO_CHAR(DTUPDATE,'YYYY/MM/DD
HH24:MI:SS')AS DTUPDATE
FROM ECSM_ITEMNO_INFORMATION
e
where
e.STRITEMNO
not in (select
i.STRITEMNO
from TBL_SMT_ITEMNO
i)
and
e.DTUPDATE
not in (select
i.CREATEDATE
from TBL_SMT_ITEMNO
i)
order by DTUPDATE
desc
Wallace's SQL:
SELECT
NUMINDEX,STRITEMNO,NUMTYPE,STRMODELNAME,TO_CHAR(DTUPDATE,'YYYY/MM/DD
HH24:MI:SS') AS DTUPDATE
FROM
ECSM_ITEMNO_INFORMATION e
where not exists ( select 1 from TBL_SMT_ITEMNO i
where
i.STRITEMNO=e.STRITEMNO
and
i.CREATEDATE=e.DTUPDATE
)
posted on 2009-09-07 20:15
Ke 阅读(213)
评论(0) 编辑 收藏 所属分类:
oracle