CrossTab查询 - 应显示字段而不分配任何人 [英] CrossTab Query - Fields should be shown with out anyone being assigned

查看:77
本文介绍了CrossTab查询 - 应显示字段而不分配任何人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我创建了一些交叉表查询,基本上现在我有一个问题,我不确定它是否是逻辑的问题。

首先这里是SQL:

Hello,
I have create some crosstab querys and basically now i have an issue , i am not sure if its a "logical" issue.
First of all here is the SQL :

展开 | 选择 | Wrap | 行号

推荐答案

使用其中一个外连接而不是内连接。左外连接或右外连接。如果连接表中不存在这些连接,则允许从一个表返回所有数据。
Use one of the outer joins instead of the inner. Either left outer join or right outer join. Those joins allow for returning all data from one table if it doesn''t exist in the joined table.


我应该手工操作还是从访问给我的模式中做到这一点?

当我从模式中尝试它总是说一些警告/错误,例如它包含ambigious外连接等等
Should i do it mannualy or from the schema that access gives me ?
As i am trying from the schema it always says some warnings/errors such as it contains ambigious outer joins etc etc


Andreasmis:

让我们来看看你的五张桌子....只是相关领域和你正在看的信息:


我无法打开你的照片'已发布...与我的IT部门的过滤器有关...


您是否介意使用以下内容列出表格:


姓名:tbl_employee

[employee_pk] autnumber primarykey

[employee_id]数字长

[employee_Fname] text(50)

[employee_Lname] text(50)

名称:tbl_leavetype

[leavetype_pk] autnumber primarykey

[leavetype_name]文本(50),没有重复,没有空,需要


名称:tbl_annualleave

[annualleave_pk]自动编号主键

[FK_employee]数字长, 1:M,来自tbl_employee的FK

[FK_leavetype]数字长,1:M,来自tbl_leavetype的FK

[annualleave_comment] text(255)


等...


恕我直言,如果有正确的信息,兔子可以发生魔法。从我正在阅读的是,您的转换查询基于基于更多查询的查询等等;因此,我认为相关数据尚未存在,并且是您外联接错误的根本原因。
Andreasmis:
Let''s take a look at your five tables.... just the related fields and the information you''re looking at:

I am not able to open the picture you''ve posted... has to do with the filters inplace by my IT...

Would you mind listing tables using something like:

Name: tbl_employee
[employee_pk] autnumber primarykey
[employee_id] number long
[employee_Fname] text(50)
[employee_Lname] text(50)

Name: tbl_leavetype
[leavetype_pk] autnumber primarykey
[leavetype_name] text(50), no duplicates, no nulls, required

Name: tbl_annualleave
[annualleave_pk] autnumber primarykey
[FK_employee] numeric-long, 1:M, FK from tbl_employee
[FK_leavetype] numeric-long, 1:M, FK from tbl_leavetype
[annualleave_comment] text(255)

etc...

IMHO, Rabbit can make magic happen if the right information is available. From what I''m reading is that your transform query is based on queries that are based on yet more queries and so forth; thus, I don''t think the relevant data is there yet and is the root cause of your ambigious outer join error.


这篇关于CrossTab查询 - 应显示字段而不分配任何人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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