交叉表问题 [英] Cross-Tab Problem

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

问题描述

**管理员编辑**

此主题已从原始版本中拆分(查询/子查询 - 百分比)。

** /管理员编辑**


看来我们即将结束对于这个问题,我想向您介绍另一个可能只会考虑一半的问题。


我创建一个交叉表查询,通过[SteveCode]进行排序将每种[RecyType]的[Tonnage]相加。我希望能够添加日期条件,因此用户可以指定查询处理两个日期之间的数据。


我在网上看起来很长很难以找到任何答案,看起来这种情况经常出现但没有适当的解决方案。我提供了以下我的查询SQL:

** Admin Edit **
This thread has been split off from the original (Query/subquery - percentage).
** /Admin Edit **

Seeing as it appears we are coming to the end of this problem, i would like to present you with another one that perhaps will only take a little thought on your half.

Im creating a cross tab query which sorts via [SteveCode] and sums the [Tonnage] for each type of [RecyType]. I want to be able to add a date criteria, so the user can specify that the query processes data between two dates.

I have looked long and hard on the net for any answers and it seems that this has appeared often but without a proper solution. I offer the following SQL of my query:

展开 | 选择 | Wrap | 行号

推荐答案


看来我们即将结束这个问题,我想再介绍另一个可能只会考虑你的一半。


我创建一个交叉表查询,通过[SteveCode]进行排序,并为每种[RecyType]的[Tonnage]求和。我希望能够添加日期条件,因此用户可以指定查询处理两个日期之间的数据。


我在网上看起来很长很难以找到任何答案,看起来这种情况经常出现但没有适当的解决方案。我提供了以下我的查询SQL:
Seeing as it appears we are coming to the end of this problem, i would like to present you with another one that perhaps will only take a little thought on your half.

Im creating a cross tab query which sorts via [SteveCode] and sums the [Tonnage] for each type of [RecyType]. I want to be able to add a date criteria, so the user can specify that the query processes data between two dates.

I have looked long and hard on the net for any answers and it seems that this has appeared often but without a proper solution. I offer the following SQL of my query:
展开 | 选择 | Wrap | 行号


最后一篇文章,如果这不解决那么我将开始一个新的线程。


我已经尝试过SQL并且缺少运算符错误消息。我对SQL的了解非常有限,所以我无法解决这个问题。
Last post then, if this doesnt solve then i will start a new thread.

Ive tried that SQL and there was a missing operator error message. my knowledge of SQL is very limited so i cannot solve this.


我对Cross-Tab查询(PIVOT)的了解也很有限,但是如果你发布了整个错误信息那么我就是''我会看看我能做些什么。


发布新帖子可能会获得一些新的,更合适的专家兴趣。
My knowledge of Cross-Tab queries (PIVOT) is also limited, but if you post the whole error message then I''ll see what I can do.

Posting a new thread might have garnered some new, more appropriate, expert interest.


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

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