阅读背景:

使用Pivot从另一个表获取值

来源:互联网 

I have a query like this

我有一个这样的查询

select 
    * 
from 
   (select vtid 
    from Transaction_tbl 
    where dtime between '01-Apr-13 00:00:00' and '18-Jun-13 23:59:59' 
      and Status >= 5) p
PIVOT
    (count(vtid) FOR vtid in ([7],[8],[9],[11],[12])) as pp
select 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: