<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)  編輯  收藏 所屬分類: 數據庫
    主站蜘蛛池模板: 一级黄色免费网站| 免费在线观看一级片| 特级毛片A级毛片100免费播放| 国产福利免费视频| 18级成人毛片免费观看| 亚洲国产av一区二区三区| 亚洲黄色一级毛片| 一级做α爱过程免费视频| 久久久久亚洲av毛片大| 亚洲综合在线一区二区三区 | 亚洲а∨精品天堂在线| 日本中文字幕免费高清视频| 免费国产怡红院在线观看| 亚洲精品中文字幕麻豆| 中国性猛交xxxxx免费看| 日本免费高清一本视频| 亚洲欧洲精品久久| 无码的免费不卡毛片视频| 最近最新的免费中文字幕| 日韩精品一区二区亚洲AV观看| 亚洲免费无码在线| 亚洲人成网站在线观看播放| 免费看一级一级人妻片| 日本v片免费一区二区三区| 疯狂做受xxxx高潮视频免费| 免费黄色小视频网站| 亚洲一线产区二线产区区| 国产zzjjzzjj视频全免费| 亚洲av成本人无码网站| 国产精品视频免费一区二区| 亚洲国产精品综合福利专区| 日本人护士免费xxxx视频| 色www永久免费网站| 亚洲日韩欧洲乱码AV夜夜摸| 99久久人妻精品免费一区| 精品日韩亚洲AV无码| 免费黄色大片网站| 久别的草原电视剧免费观看| 亚洲免费网站观看视频| 日本a级片免费看| 精品国产污污免费网站|