用帽子调整日期 [英] Adjusting Dates with cap

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

问题描述

我有一张桌子(TblDateHistory)来记录因受伤而损失的天数:

I have a table (TblDateHistory) to record lost days due to injuries:

展开 | 选择 | Wrap | 行号

推荐答案

你可能会找到一个愿意带你走这条路的人。


此时我将限制自己将你链接到一篇文章(规范化和表格结构)解释了为什么这种方法(更新和存储计算)价值观)是这样的糟糕的想法,很可能会给你留下一些复杂的问题,例如这个问题。
You may find someone who is willing to take you further along this path.

I will limit myself at this time to linking you to an article (Normalisation and Table structures) which explains why this approach (updating and storing calculated values) is such a bad idea and is likely to leave you with complicated problems such as this one.


我同意NeoPa的看法,这个问题比最初想象的要复杂得多,特别是因为你的数据不是处于正常化状态。无论出于何种原因,如果您希望将数据和结构保持在当前状态,我会要求您显示一些示例测试数据,例如特定个人的12个记录。您之前已经定义了表名以及组成它的字段。只是一些现实的数据,以及这些数据的结果应该是什么。
I agree with NeoPa in that this problem is a lot more complicated than initially envisioned, especially since your data is not in a ''Normalized'' State. If, for whatever reason, you wish to keep your data and structure in its current State, I would request that you display some sample Test Data, say 12 Records for a specific individual. You have previously defined your Table Name, along with the Fields that comprise it. Just some realistic data, and what the outcome from this data should be, will do the trick.


大家好,感谢您的回复。对于我的项目,数据库由17个表组成,本文中提到的表是唯一一个这样排列的表。我阅读了关于规范化的帖子,它非常有用,所以感谢你。我会对如何使用不同的结构存储这些数据的技巧感兴趣。根据你的评论,似乎这个改变会使这里提到的计算更容易一些。


我在这个数据库中只有样本数据,所以我会创建更多条目并在本周末将数据库附加到此主题的帖子中供您查看。


再次感谢您的帮助。
Hi All, thanks for the response. For my project, the database consists of 17 tables and the one mentioned in this post is the only one arranged like this. I read the post about Normalizing and it was very informative so thanks for that. I would be interested in tips on how I can store this data using a different structure. Based on your comments, it seems that this change would make a calculation such as is mentioned here a bit easier.

I only have sample data in this database, so I will create some more entries and attach the db to a post in this thread this weekend for your review.

Thanks again for your help.


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

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