<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 評(píng)論 :: 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 北極雪 閱讀(218) 評(píng)論(0)  編輯  收藏 所屬分類: 數(shù)據(jù)庫

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲午夜国产精品无码| 国产老女人精品免费视频| 亚洲熟妇av一区二区三区漫画| 色天使色婷婷在线影院亚洲| 日韩吃奶摸下AA片免费观看 | 久久成人a毛片免费观看网站| avtt亚洲天堂| a级毛片免费观看在线| 亚洲人成色7777在线观看不卡 | ww在线观视频免费观看w| 亚洲av无码成人精品区| 免费无遮挡无遮羞在线看| 国产a级特黄的片子视频免费| 农村寡妇一级毛片免费看视频| 日本中文一区二区三区亚洲 | 亚洲精品免费观看| 99久久国产免费中文无字幕| 亚洲首页在线观看| 国产精品久久久久久久久久免费 | 添bbb免费观看高清视频| 午夜亚洲福利在线老司机| 三级片免费观看久久| 日韩电影免费在线观看网址| 亚洲毛片av日韩av无码| 久久国产精品国产自线拍免费| 久久精品国产亚洲AV无码娇色 | 日本午夜免费福利视频| 免费看黄福利app导航看一下黄色录像| 亚洲国产天堂久久综合| 中文字幕乱码一区二区免费| 精品亚洲成a人片在线观看 | 亚洲&#228;v永久无码精品天堂久久 | 一本色道久久综合亚洲精品高清| 国产精品小视频免费无限app| 亚洲AV成人片色在线观看| 97热久久免费频精品99| 精品亚洲国产成人av| 国产亚洲精品a在线观看app | 久操视频在线免费观看| 国产亚洲精品bv在线观看| 亚洲午夜无码片在线观看影院猛 |