日期作为主键? [英] Date as primary key?

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

问题描述

在单个表单中我使用id和date作为主键,所以当我们将它保存到记录集时,我们如何检查重复的条目?

展开 < span class =codeDivider> | 选择 | Wrap | Line数字

解决方案




如果我是你,我不会使用日期作为主键。如果您愿意,也可以使用它:)。对于你的问题,尝试使用计数


祝你有愉快的一天!


Rey Sean

使用COUNT检查是否存在记录。


仅在记录不存在时插入。


< blockquote class =post_quotes>



如果我是你,我不会使用日期作为主键。如果您愿意,也可以使用它:)。对于您的问题,请尝试使用计数


祝您有愉快的一天!


Rey Sean



我用它不是为了我,而是为了计算某个特定员工的加班工作

例如:

MII / 101已经工作了12个小时31个

10个小时30个

8小时29个

因为8是正常时间,

如果你在alist视图中点击MII / 101

id +日期shoule会在另一个列表视图中显示


Within a single form I have used id and date as primary key, so while we are saving it onto a recordset, how can we check the duplicate entry?

Expand|Select|Wrap|Line Numbers

解决方案

Hi

If i were you, i would not use date as primary key. You can also use it if you want : ). For your problem, try to use Count.

Have a nice day!

Rey Sean


Check for existence of the record using COUNT.

Insert only if the record does not exist.


Hi

If i were you, i would not use date as primary key. You can also use it if you want : ). For your problem, try to use Count.

Have a nice day!

Rey Sean

that im using it not for me but,to calculate the overtime work of a particular employee for amonth
eg:
MII/101 has worked 12 hours on 31
10 hours on 30
8 hours on 29
As 8 is the normal time,
such that if u click MII/101 in alist view
the id +the date shoule be shown in another list view


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

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