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

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

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

    lqxue

    常用鏈接

    統計

    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 閱讀(646) 評論(0)  編輯  收藏 所屬分類: database

    主站蜘蛛池模板: 亚洲伊人久久大香线蕉苏妲己| 国产在线精品一区免费香蕉| 久久亚洲精品AB无码播放| 在线免费观看污网站| 99蜜桃在线观看免费视频网站| 一本久久免费视频| 国产AV无码专区亚洲AV蜜芽| 91亚洲性爱在线视频| 亚洲AV本道一区二区三区四区| 亚洲日韩国产成网在线观看| 国产无遮挡又黄又爽免费视频 | 亚洲精品岛国片在线观看| 91在线品视觉盛宴免费| 中文字幕在线免费观看| 国产成人免费ā片在线观看老同学| 老司机午夜性生免费福利| 亚洲日韩国产欧美一区二区三区| 亚洲视频手机在线| 亚洲视频在线免费观看| 亚洲精品无码不卡在线播放HE| 亚洲日韩国产精品乱| 一区二区三区亚洲视频| 国产成人在线免费观看| 青青草国产免费久久久91| 最近最新中文字幕完整版免费高清| 国产成人精品免费视频大全麻豆| 日本一卡精品视频免费| 色欲国产麻豆一精品一AV一免费| 日本高清高色视频免费 | 国产亚洲美女精品久久久久狼| 亚洲日本一区二区三区在线不卡| 亚洲日本在线观看视频| 国产偷国产偷亚洲高清日韩| 中文字幕亚洲激情| 亚洲色成人中文字幕网站| 亚洲真人无码永久在线| 国产亚洲av片在线观看16女人 | 中文字幕免费观看全部电影| 成人免费av一区二区三区| 精品成人免费自拍视频| 国产成人精品无码免费看|