日期属于范围内 [英] Date Falls Within a Range

查看:109
本文介绍了日期属于范围内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Union Access Query(ID,Begin_Date,End_Date)中有三个字段。我想修改查询以包含用户输入的参数日期,并在参数日期落在Begin_Date到End_Date的范围内时生成结果。任何想法?

I have three fields in a Union Access Query (ID, Begin_Date, End_Date). I want to modify the query to include a parameter date to be entered by the user and produce a result if the parameter date falls within the range of Begin_Date to End_Date. Any ideas?

推荐答案

如果您发布查询的当前SQL,我们不仅会获得一些理解请求的上下文,但您也可能最终根据您的需求量身定制答案。
If you post your current SQL for the query we not only get a bit of context within which to understand the request, but you also may end up with an answer more tailored to your needs.


抱歉。一定是我的新手。这是联合查询代码:
Sorry. Must be the Newbie in me. Here is the union query code:
展开 | 选择 | Wrap | 行号



对不起。一定是我的新手。这是联合查询代码:


SELECT [CLIENT_ID],[BEGIN_DATE],[END_DATE] FROM Client_Count_Current_Placement

UNION SELECT [CLIENT_ID],[BEGIN_DATE] ,[END_DATE] FROM Client_Count_Historical_Placement;


现在我想让用户输入参数日期,如果此参数日期在BEGIN_DATE到END_DATE的范围内,则只显示那些记录。这一切都将在查询中完成。


感谢您的帮助和对不断增长的痛苦感到抱歉。
Sorry. Must be the Newbie in me. Here is the union query code:

SELECT [CLIENT_ID], [BEGIN_DATE], [END_DATE] FROM Client_Count_Current_Placement
UNION SELECT [CLIENT_ID], [BEGIN_DATE], [END_DATE] FROM Client_Count_Historical_Placement;

Now I want to have a user input a parameter date, and if this parameter date falls within the range of BEGIN_DATE to END_DATE, only those records would show. This would all be done within a query.

Thanks for any help and sorry for the growing pains.



我对工会查询的经验很少,但这应该有用...... NeoPa,如果我错了,请纠正我。

试试这个:

I have very little experience with union queries but this should work ...NeoPa, correct me if I''m wrong.
Try this:

展开 | 选择 | Wrap | 行号


这篇关于日期属于范围内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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