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

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

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

    相信自己!

      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      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 北極雪 閱讀(217) 評論(0)  編輯  收藏 所屬分類: 數據庫
    主站蜘蛛池模板: 免费无码又爽又刺激高潮视频| 亚洲精品天堂成人片AV在线播放| 一级一级毛片免费播放| 国产精品免费视频网站| 亚洲中文字幕久久精品无码A| 一二三四在线播放免费观看中文版视频| 亚洲欧洲日韩国产综合在线二区| 国产成人免费a在线视频app| 亚洲GV天堂无码男同在线观看| 性xxxx视频播放免费| 亚洲精品V天堂中文字幕| 妞干网在线免费观看| 国产亚洲综合精品一区二区三区| 国产小视频在线观看免费| 污视频网站在线免费看| 成人午夜亚洲精品无码网站| 免费看一区二区三区四区| 日韩免费观看的一级毛片| 国产精品亚洲一区二区三区 | 麻豆高清免费国产一区| 中文字幕亚洲综合久久2| 男人扒开添女人下部免费视频| 一本色道久久88亚洲综合| 亚洲中文字幕人成乱码| 在线播放高清国语自产拍免费| 国产综合成人亚洲区| 亚洲精品无码永久中文字幕| 99re6热视频精品免费观看| 亚洲香蕉久久一区二区| 波多野结衣视频在线免费观看| 中文字幕在线免费看线人| 免费大黄网站在线观| 黄网站免费在线观看| 亚洲国产高清视频在线观看| 宅男666在线永久免费观看| 中文字幕免费视频精品一| 久久亚洲精品专区蓝色区| 亚洲福利中文字幕在线网址| 久久大香香蕉国产免费网站| 亚洲综合激情另类专区| 成人免费网站久久久|