查询标识以识别过期的信用卡 [英] Query Criteria to Identify Expired Credit Cards

查看:95
本文介绍了查询标识以识别过期的信用卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我想在生成查询标准方面提供一些帮助,这些标准将识别已在访问数据库上过期的信用卡。


特定字段[C /卡过期]的格式为数据类型为

''Text'',输入掩码为'00 / 00 '',所以所有到期日都设定

例如10/13(代表2013年10月)。


我有一个简短的尝试为了解决这个问题,但是我无法确定
提出了先看一年的标准...


任何帮助都将不胜感激! !!


亲切的问候,


sharsy

Hello guys,

I would like some help in generating query criteria that will identify
credit cards that have expired on an access database.

The specific Field [C/Card Expire] is formatted with a Data Type of
''Text'' and has an input mask of ''00/00'', so all expiry dates are set
out for example as 10/13 (which represents October 2013).

I have hada brief go at trying to work it out, but I was unable to
come up with criterion that looked at the year first...

Any help would be greatly appreciated!!!

Kind regards,

sharsy

推荐答案

sharsy写道:
sharsy wrote:

大家好,


我想在生成查询标准方面提供一些帮助来识别

已在访问数据库上过期的信用卡。


sp ecific Field [C / Card Expire]格式为数据类型为

''Text''并且输入掩码为''00 / 00'',因此所有到期日都设置为

例如10/13(代表2013年10月)。


我有一个简单的尝试解决它,但我无法

提出了先看一年的标准...


任何帮助都将不胜感激!!!


亲切的问候,


sharsy
Hello guys,

I would like some help in generating query criteria that will identify
credit cards that have expired on an access database.

The specific Field [C/Card Expire] is formatted with a Data Type of
''Text'' and has an input mask of ''00/00'', so all expiry dates are set
out for example as 10/13 (which represents October 2013).

I have hada brief go at trying to work it out, but I was unable to
come up with criterion that looked at the year first...

Any help would be greatly appreciated!!!

Kind regards,

sharsy



也许这个概念会有所帮助。这是从debug / immediate

窗口完成的。

? cdate(" 03/2013")

3/1/2013

? cdate(" 03/2013")< #3/1/2013#

错误

? cdate(" 03/2013")=#3/1/2013#

True

? cdate(" 03/2013")#3/1/2013#

错误


好​​的,所以你可以创建一个计算的查询中的字段。您的字段是

,称为[C /卡过期]。不是我命名字段的方式,但如果你喜欢

你的命名方案对你有更多的权力。


计算的查询字段包含这些组件

ColumnName:函数/常数


在你的情况下

CCDateFld:Cdate(左([C /卡过期],3) &"" 20& Mid([C /卡过期],4))


基本上我通过添加20来创建日期字段。到2位数年份。

我想你可以使用IIF()语句,如果你需要回到

1900'。然后可以过滤查询中的此列。



http://www.youtube.com/watch?v=IWbe-NSK6Ic

Maybe this concept will help. This was done from the debug/immediate
window.
? cdate("03/2013")
3/1/2013
? cdate("03/2013") < #3/1/2013#
False
? cdate("03/2013") = #3/1/2013#
True
? cdate("03/2013") #3/1/2013#
False

OK, so you can create a "calculated" field in a query. Your field is
called [C/Card Expire]. Not the way I''d name a field but if you like
your naming scheme more power to you.

A calculated query field has these components
ColumnName : Function/Constant

In your case
CCDateFld : Cdate(Left([C/Card Expire],3) & "20" & Mid([C/Card Expire],4))

Basically I''m creating a date field by adding "20" to the 2 digit year.
I suppose you can use an IIF() statement if you need to go back to the
1900''s. This column in your query can then be filtered.

Water
http://www.youtube.com/watch?v=IWbe-NSK6Ic


是的,我只是尝试过,但它似乎没有工作 - 它显示日期

但它们不匹配到期日。此外,它似乎分配

a特定日期(即19或31),这与我需要它的

目的无关 - 如果它们会好的所有人都被分配了第一天的日期(例如01/05/08),因为那时他们仍然是平等的。
Yeah I just tried that but it doesn''t seem to work - it displays dates
but they don''t match up to the expiry date. Also, it seems to allocate
a specific date (ie. the 19th or 31st) which is not relevant for the
purposes I need it for - It would be fine if they were all allocated a
date of the 1st (e.g. 01/05/08) because then they would still be equal.


sharsy写道:
sharsy wrote:

是的我只是尝试了但是它似乎没有用 - 它显示日期

但是它们不匹配到期日。
Yeah I just tried that but it doesn''t seem to work - it displays dates
but they don''t match up to the expiry date.



我不知道你的到期日是什么。而且,IMO,如果它应该与一个到期日相匹配,请使用到期日期


此外,它似乎分配

I have no idea what your expiry date is. And, IMO, if its supposed to
match an expiry date, use the expiry date instead

Also, it seems to allocate


a特定日期(即19日或31日)与我需要它的

目的无关 - 如果它们都被分配了

1日(例如01/05/08),因为那时他们仍然是平等的。
a specific date (ie. the 19th or 31st) which is not relevant for the
purposes I need it for - It would be fine if they were all allocated a
date of the 1st (e.g. 01/05/08) because then they would still be equal.



? cdate(" 03/2021")

3/1/2021


它总是默认为我这个月的第一个日期。也许它应该使用欧洲日期格式给你

。如果你需要特定的话,你可以看看DataSerial所以你可以在一个月,一天,一年中获得



实际上,我想你会希望它是这个月的最后一天所以我会给b $ b加一个月并减去一天来得到一个月的最后一个日期。


? DateAdd(" m",1,cdate(" 03/2021")) - 1

3/31/2021


Skye http://www.youtube.com/watch?v=jpfBl33if4U


这篇关于查询标识以识别过期的信用卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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