SQL多层头 [英] SQL multi layer headers

查看:98
本文介绍了SQL多层头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以在表中创建多层页眉?例如。我计划为上个月的报告创建报告,但是在输出标题中,我希望上个月报告标题和子标题服务器和应用程序

  ______________________________________________ 
上个月的报告|去年的报道|
________________________ | _____________________ |
服务器|应用|服务器| Apps |
________________________ | ______________________
xyz | tomcat | .... | ..... |
abc | apache | .... | ..... |
.... | ...... | .... | ..... |

是否可以创建上述标题布局?

解决方案

您可以这样做的方式是使用普通的SQL查询,如下所示:

 选择LastMonthServer,LastMonthApplication,LastYearServer,LastYearApps 
from ....
where ....
order by ...

然后在您使用的任何报告系统中简单配置报告布局,无论您希望如何。

< SQL数据库不处理表示,只是数据的结构。


Is there any way I can create multi layer headers in a table? For example. I am planning to create report for last month report but in output header I want "Last month report" header and sub header "server" and "application"

______________________________________________
   Last Month Report    |  Last year report   |
________________________|_____________________|
Server   |   Application| Server   | Apps     |
________________________|______________________
xyz      |     tomcat   |....      | .....    |
abc      |     apache   |....      | .....    |
....     |     ......   |....      | .....    |

is it possible to create above headers layout ?

解决方案

The way you would do this is with a plain SQL query like this:

 select LastMonthServer, LastMonthApplication, LastYearServer, LastYearApps
 from ....
 where ....
 order by ...

And then simply configure your report layout however you want it, in whatever reporting system you're using.

SQL databases do not deal with presentation, just the structure of the data.

这篇关于SQL多层头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆