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

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

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

    lqxue

    常用鏈接

    統(tǒng)計(jì)

    book

    tools

    最新評論

    mysql 行變列的例句

    select distinct item.reportoid, item.lineoid,  item.accountoid, sun.amount, mon.amount, tue.amount, wes.amount, thur.amount, fri.amount, sat.amount
    from expenseitem item
    left join (select reportoid, accountoid, lineoid, amount, itemDate from expenseitem
     where itemDate = '2007-11-04' ) sun
     on item.reportoid = sun.reportoid and
      item.accountoid = sun.accountoid and
      item.lineoid = sun.lineoid and
      item.itemDate = sun.itemDate
    left join (select reportoid, accountoid,  lineoid, amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 1) ) mon
     on item.reportoid = mon.reportoid and
      item.accountoid = mon.accountoid and
      item.lineoid = mon.lineoid and
      item.itemDate = mon.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 2)) tue
     on item.reportoid = tue.reportoid and
      item.accountoid = tue.accountoid and
      item.lineoid = tue.lineoid and
      item.itemDate = tue.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 3)  ) wes
     on item.reportoid = wes.reportoid and
      item.accountoid = wes.accountoid and
      item.lineoid = wes.lineoid and
      item.itemDate = wes.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 4)  ) thur
     on item.reportoid = thur.reportoid and
      item.accountoid = thur.accountoid and
      item.lineoid = thur.lineoid and
      item.itemDate = thur.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 5)  ) fri
     on item.reportoid = fri.reportoid and
      item.accountoid = fri.accountoid and
      item.lineoid = fri.lineoid and
      item.itemDate = fri.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 6) ) sat
     on item.reportoid = sat.reportoid and
      item.accountoid = sat.accountoid and
      item.lineoid = sat.lineoid and
      item.itemDate = sat.itemDate
    where item.reportoid = 3712
    order by reportoid, accountoid;

    posted on 2008-07-08 10:52 lqx 閱讀(651) 評論(0)  編輯  收藏 所屬分類: database

    主站蜘蛛池模板: 人禽伦免费交视频播放| 国产一级黄片儿免费看| 羞羞视频在线免费观看| 中文字幕久精品免费视频| 综合久久久久久中文字幕亚洲国产国产综合一区首 | 人人狠狠综合久久亚洲88| 中文在线免费观看| 国产亚洲精品精华液| 精品一卡2卡三卡4卡免费视频| 亚洲级αV无码毛片久久精品| 国产一区二区三区免费观在线| 久久久久亚洲AV无码专区网站 | 亚洲av日韩av高潮潮喷无码| 国产成人无码区免费网站| 亚洲成AV人片在| 99久久综合精品免费| 亚洲国产成人九九综合| 91在线视频免费播放| 国产亚洲一卡2卡3卡4卡新区| 蜜桃成人无码区免费视频网站 | 深夜免费在线视频| 亚洲色婷婷六月亚洲婷婷6月| 亚洲综合av一区二区三区不卡| 黄色片免费在线观看| 亚洲AV区无码字幕中文色| 99久久免费国产香蕉麻豆| 亚洲色大成网站www永久男同| 亚洲精品第一国产综合精品99| 亚洲午夜精品久久久久久app| 国产精品另类激情久久久免费| 亚洲天堂福利视频| 日本免费电影一区| 亚洲精华液一二三产区| 亚洲一区二区视频在线观看| 一个人免费视频观看在线www| 亚洲国产一区在线观看| 俄罗斯极品美女毛片免费播放 | 成年黄网站色大免费全看| 阿v免费在线观看| 亚洲国产精品免费视频| 中文字幕不卡免费高清视频|