select distinct d50.customer_part_number,d44.prod_para_10 p10
from data0050 d50 ,data0044 d44 where d50.rkey=d44.source_ptr
and d50.customer_part_number = '0161-1097'
查询的结果:
        customer_part_number         p10
1 0161-1097                                
2 0161-1097            0.0130              
得到了两条结果,我想去掉第一条没有p10为空.
要的是第二条p10的值.
请问怎么得到.

解决方案 »

  1.   

    select distinct d50.customer_part_number,d44.prod_para_10 p10
    from data0050 d50 ,data0044 d44 where d50.rkey=d44.source_ptr
    and d50.customer_part_number = '0161-1097' and p10 is not null
      

  2.   

    select distinct d50.customer_part_number,d44.prod_para_10 p10
    from data0050 d50 ,data0044 d44 where d50.rkey=d44.source_ptr
    and d50.customer_part_number = '0161-1097' and d44.prod_para_10 is not null
      

  3.   

    zhangl_cn(不做和尚了!) 
    这样查出来结果还是二条记录.
    查询的结果:
            customer_part_number         p10
    1 0161-1097                                
    2 0161-1097            0.0130