显示没有数据的记录。 [英] Showing records with no data.

查看:68
本文介绍了显示没有数据的记录。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我的情况如下。

1.有一个名为Project ID的字段,它有几个Resource类别。每个资源类别在不同类别中的金额很少,或者没有任何金额。

2.我正在提取一份报告,显示与特定资源类别相关的数据项目ID。

3.我的问题是它没有显示没有任何数据的资源类别。假设ProjectID:12ABC1234有4个资源类别,

RC1: 1A1,它有相关数据

RC2:2B2,它有相关数据

RC3:3C3,没有任何关联类别

RC4: 4E4,没有与类别相关的内容

我的问题是如何在报告中显示RC3和RC 4,数据行说N / A或$ 0 ??

谢谢。

我目前使用的查询是

展开 | 选择 | 换行 | 行号

解决方案

0 ??

谢谢。

我目前使用的查询是

展开 | 选择 | Wrap | 行号


在FROM子句的某个地方,你有一个INNER JOIN,你需要一个LEFT JOIN。有关详细信息,请参阅 SQL JOIN


我要说你想要改变你的FROM子句以在资源类别上使用LEFT JOIN:

展开 | 选择 | Wrap | 行号

Hello,
I have a situation as follows.
1. There is field called Project ID which has several Resource categories. Each Resource category has either few amounts of money in different categories or it does not have any amount of money.
2. I am pulling out a report which shows the data related to the resource categories for a specific project ID.
3. My problem is it does not show the resource categories which do not have any data in. Suppose ProjectID: 12ABC1234 has 4 Resource Categories,
RC1: 1A1, it has related data
RC2: 2B2, it has related data
RC3: 3C3, there is nothing associated with category
RC4: 4E4, there is nothing associated with category
My question is how can I show RC3 and RC 4 in my report with the data rows saying N/A or $0??
Thanks.
The query I am currently using is

Expand|Select|Wrap|Line Numbers

解决方案

0??
Thanks.
The query I am currently using is

Expand|Select|Wrap|Line Numbers


Somewhere in your FROM clause you have an INNER JOIN where you need a LEFT JOIN. See SQL JOINs for more on this.


I''m going to say that you would want to change your FROM clause to utilize a LEFT JOIN on resource category:

Expand|Select|Wrap|Line Numbers


这篇关于显示没有数据的记录。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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