select ck.产品编号 cp.产品名称 where sysdate-日期>=你认可的天数 and ck.产品编号=cp.产品编号

解决方案 »

  1.   

    Select A.产品编号,B.产品名称 From CK A,CP B
     where not (A.日期 Between BegDate and EndDate)
       and A.产品编号 = B.产品编号
      

  2.   

    select 产品编号,产品名称 from CK,CP 
    where 日期 <:begindate and 日期 <:enddate
    adn CK.产品编号 = CP.产品编号
      

  3.   

    where 日期 <:begindate and 日期 >:enddate
      

  4.   

    对不起,上面错了
    select cp.产品编号,cp.产品名称 from cp where cp.产品编号 not in(select distinct ck.产品编号 from ck where sysdate-日期<你认可的天数)说明:(select distinct ck.产品编号 from ck where sysdate-日期<你认可的天数)  是选出出库表中所有在时间段内出库的产品编号。然后再选出产品表中不在这个集合中的编号就可以了。另:出库表只用日期作为关键字是不对的,应该把日期和产品编号一起做关键字。