我如何找到本月没有收费的客户 [英] How do I Find Customers Not Billed This Month

查看:71
本文介绍了我如何找到本月没有收费的客户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个结算数据库,用于每六个月向客户收费。所有客户都会同时收费。我想做一份报告,告诉我客户是否在一段时间内没有账单。我有tblInvoices和tblCustomer。我需要遍历每个客户,看看它是否在指定的结算周期内的tblInvoices中匹配。我该怎么做呢?我猜它是一个查询,但不像我曾经创建的那个。 tblInvoices和tblCustomer使用两个表中的CustomerID字段相关联,其中InvoiceID是tblInvoices的PK,而CustomerID是tblCustomer的PK。

I have a billing database that is used to bill customers every six months. All customers are billed at the same time. I would like to make a report that tells me if a customer didn''t have a bill for a certain period. I have tblInvoices and tblCustomer. I need to run through every customer to see if it has a match in the tblInvoices for a specified billing period. How do I do this? I''m guessing that it is a query, but not like one that I''ve ever created. tblInvoices and tblCustomer are related using the CustomerID fields in both tables with InvoiceID being the PK for tblInvoices and CustomerID being the PK for tblCustomer.

推荐答案

标题中的问题和身体中的问题是不同的,我不确定你实际问的是哪一个。


如果你想要归还所有有当前账单的客户月,你可以做
The question in your title and the question in the body are different, I''m not sure which one you''re actually asking about.

If you want to return all customers that had a bill for the current month, you can do
展开 | 选择 | Wrap | 行号


现在你提到它,t itle令人困惑。我的意思是,如果他们有账单,我想要那些没有账单的账单。抱歉。


这是我想要的一个例子。如果我有三家公司ABC,DEF和GHI以及公司ABC和DEF都有账单但GHI没有(因为他们没有买任何东西)我希望公司GHI在查询中返回。那更有意义吗?
Now that you mention it, the title is confusing. I was meaning if they had a bill as in I wanted those that did not have a bill. Sorry.

Here is an example of what I''m wanting. If I have three companies ABC, DEF, and GHI and companies ABC and DEF had bills but GHI didn''t (because they hadn''t bought anything) I want company GHI to be returned in the query. Does that make more sense?


我更加困惑。如果他们没有买任何东西,为什么他们会有账单?或者你为什么要向他们发送账单?
I''m even more confused. If they haven''t bought anything, why would they have a bill? Or why would you want to send them a bill?


这篇关于我如何找到本月没有收费的客户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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