当前位置:网站首页>SqlServer行转列PIVOT
SqlServer行转列PIVOT
2022-07-03 02:39:00 【鏗木鏘林】
现有原始数据表:SELECT * FROM FIX_0528_ADD

需要将FMONTH字段行转成列,汇总FADD数量:
SELECT FNAME,[2022-01],[2022-02],[2022-03],[2022-04]
FROM FIX_0528_ADD
PIVOT(SUM(FADD) FOR FMONTH IN ([2022-01],[2022-02],[2022-03],[2022-04])) T执行后结果:

边栏推荐
- Baidu map - surrounding search
- Codeforces Round #418 (Div. 2) D. An overnight dance in discotheque
- GBase 8c系统表-pg_attribute
- Gbase 8C system table PG_ cast
- [flutter] example of asynchronous programming code between future and futurebuilder (futurebuilder constructor setting | handling flutter Chinese garbled | complete code example)
- 面试八股文整理版
- xiaodi-笔记
- [tutorial] chrome turns off cross domain policies CORS and samesite, and brings cookies across domains
- Thread safe singleton mode
- GBase 8c 函数/存储过程参数(二)
猜你喜欢

Oauth2.0 authentication, login and access "/oauth/token", how to get the value of request header authorization (basictoken)???

错误Invalid bound statement (not found): com.ruoyi.stock.mapper.StockDetailMapper.xxxx解决

Classes and objects - initialization and cleanup of objects - constructor call rules

Random Shuffle attention

oauth2.0鉴权,登录访问 “/oauth/token”,请求头Authorization(basicToken)如何取值???
![[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)](/img/e5/c01f760b07b495f5b048ea367e0c21.gif)
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)

【翻译】具有集中控制平面的现代应用负载平衡

《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨

基于线程池的生产者消费者模型(含阻塞队列)

Random shuffle note
随机推荐
[fluent] futurebuilder asynchronous programming (futurebuilder construction method | asyncsnapshot asynchronous calculation)
SQL server queries the table structure of the specified table
GBase 8c 创建用户/角色 示例二
Principle and application of database
Informatics Olympiad one general question bank 1006 a+b questions
UDP receive queue and multiple initialization test
Simple understanding of SVG
GBase 8c触发器(二)
Tongda OA V12 process center
面试八股文整理版
Gbase 8C system table PG_ conversion
基于can总线的A2L文件解析(2)
Awk from getting started to being buried (2) understand the built-in variables and the use of variables in awk
GBase 8c系统表-pg_constraint
Build a private cloud disk cloudrev
Gbase 8C create user / role example 2
awk从入门到入土(1)awk初次会面
Compréhension simple de SVG
【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
Gbase 8C system table PG_ constraint