Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个交叉表查询,显示要以报告格式呈现的最终结果。
我需要将大约 30 列分组并汇总为一个主列。
Microsoft 2010 以及表和字段名称存在问题。
这样的事情应该这样做:
select (sum(t1.col1) + sum(t1.col2) + sum(t2.col3) + ...) as master from yourTable1 t1, yourTable2 t2, ... where ...