<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    相信自己!

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      26 隨筆 :: 3 文章 :: 13 評論 :: 0 Trackbacks

     

    select /*t5.emp_name as sale_name,
           t9.emp_name as cs_name,
           t5.dept_name,
           t5.friend_id,
           t5.friend_name,
           t5.contract_number,
           t5.total_value,
           t5.so_id,
           t5.start_date,
           t5.end_date,
           t5.friend_phone*/
           count(*)
      from (select t1.cust_id as friend_Id,
                   t1.so_id,
                   t1.emp_id,
                   t2.emp_name,
                   tf.friend_name,
                   t3.dept_name,
                   tf.friend_phone,
                   t1.so_code as contract_number,
                   t1.so_amount as TOTAL_VALUE,
                   t1.so_delivery_date as START_DATE,
                   t1.so_PAYMENT_DATE as END_DATE
              from tc_sales_order_m t1,
                   tc_employee t2,
                   tc_department t3,
                   tc_friend tf
             where t1.owner_id = 1
               and t2.owner_id = 1
               and t3.owner_id = 1
               and tf.owner_id = 1
               and t1.emp_id = t2.emp_id
               and t2.dept_id = t3.dept_id
               and tf.friend_id=t1.cust_id
            and t1.cust_id in (select td.cust_id
                      from (select
                                   tm.cust_id,
                                   max(tm.so_payment_date) as end_date
                              from tc_sales_order_m tm
                             where tm.owner_id = 1
                             group by tm.cust_id) td
                     where td.end_date < add_months(sysdate, -3))
               and t3.biz_dept_id = '110'
               and t3.DEPT_CODE not like '0112%'
               and t3.DEPT_CODE not like '0113%') t5,
           (select t4.emp_name, t2.friend_id
              from rel_friend_emp t2, tc_department t3, tc_employee t4
             where t2.emp_id = t4.emp_id
               and t3.dept_id = t4.dept_id
               and t2.owner_id = 1
               and t3.owner_id = 1
               and t4.owner_id = 1
               and t2.is_self = 1
               and t3.biz_dept_id = '130') t9
     where t5.friend_id = t9.friend_id(+)
    posted on 2008-09-27 16:14 北極雪 閱讀(223) 評論(0)  編輯  收藏 所屬分類: 數據庫
    主站蜘蛛池模板: 一个人免费观看www视频| 久久久久久国产精品免费免费| 成人特黄a级毛片免费视频| 久久精品国产亚洲AV无码娇色 | 欧美日韩国产免费一区二区三区| 久久国产亚洲电影天堂| 一个人免费视频在线观看www | 免费人成年轻人电影| 亚洲午夜精品一区二区公牛电影院| 亚洲妇女无套内射精| 四虎永久在线观看免费网站网址| 亚洲AV区无码字幕中文色| 精精国产www视频在线观看免费| 亚洲国产精品激情在线观看 | 亚洲欧洲日本精品| 午夜免费不卡毛片完整版| 精品丝袜国产自在线拍亚洲| 国产乱子伦精品免费无码专区| 亚洲人成77777在线观看网| 扒开双腿猛进入爽爽免费视频 | 在线日韩日本国产亚洲| 在线免费中文字幕| 亚洲伊人色一综合网| 性短视频在线观看免费不卡流畅| 亚洲国产精品久久| 国产色爽免费视频| 99在线观看视频免费| 在线综合亚洲欧洲综合网站| 免费无码又爽又刺激高潮的视频| 亚洲乱理伦片在线观看中字| 美丽姑娘免费观看在线观看中文版| 亚洲中文字幕无码日韩| 黄色短视频免费看| 亚洲人成免费电影| 亚洲成色www久久网站夜月| 24小时在线免费视频| 特黄特色大片免费| 亚洲日本中文字幕天堂网| 久久国产精品国产自线拍免费| 久久久久久亚洲精品中文字幕| 黄色成人免费网站|