为时间范围分配数值? [英] Assign a numeric value to a time range?

查看:42
本文介绍了为时间范围分配数值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个数据库,用于记录我工作的安全部门的服务呼叫。


在该数据库中,它记录了输入日期[EntryDate]和输入时间[EntryTime]。出于统计目的,我希望能够为某些时间范围分配数值。


如;

07:00 - 14:59 = 1

15:00 - 22:59 = 2

23:00 - 06:59 = 3


我无法弄清楚如何做到这一点。任何帮助将不胜感激。

I have a database that I created for logging Calls for Service for a Security Department I work for.

In that database it logs the Date of Entry [EntryDate] and Time of Entry [EntryTime]. For statistical purposes I would like to be able to assign a numeric value to certain time ranges.

Such as;
07:00 - 14:59 = 1
15:00 - 22:59 = 2
23:00 - 06:59 = 3

I cannot figure out how to do this though. Any help would be appreciated.

推荐答案

您好。


创建一个结构如下的表:

Hello.

Create a table with a structure like the following:

展开 | 选择 | Wrap | 行号


我有桌子,如果我在上面说的话没有任何意义,我很抱歉,但事实是,我不知道如何解释它。


我正在寻找/要做的是,如果我通过query / vba / form等在表中输入一个项目,它将为该条目分配一个数值根据项目的输入时间。该数值由我在上面列出的范围确定。


它是什么,是数据库跟踪我们在安全部门收到的服务电话。这些电话在一天中的所有时间都进来,我们全天候运行3班,第一班是0700到1459,第二班是1500 - 2259,第三班是2300 - 0700.我正在努力确定根据输入呼叫的时间将呼叫分配给班次。
I have the table and I''m sorry if what I state above didn''t make any sense , but truth be told I don''t know how to explain it.

What I''m looking for/to do is that if I enter an in item into the table either by query/vba/form etc it will assign a numeric value to the entry based on what time the item was entered. That numeric value is determined by the ranges I listed above.

What it is , is the database tracks the calls for service we recieve at our Security Department. Those calls come in at all times of the day , and we operate 24/7 on a 3 shift assignment, 1st shift is 0700 to 1459, 2nd is 1500 - 2259 and 3rd is 2300 - 0700. I''m trying to determine a way to assign the call to the shift based on what time the call was entered.


好。


无需存储额外的号码在存储时间的表中,因为转换规则被存储。在我建议你添加到数据库的表格中。

请读一个非常相似的主题 - 分组查询范围


此外,我想您将从阅读以下文章中受益:
数据库规范化和表格结构
< a href =http://bytes.com/topic/access/insights/608296-sql-joinstarget =_ blank> SQL JOINs


问候,

Fish
Well.

There is no need to store additional number in the table where time is stored since conversion rules are "stored" in the table which I''ve suggested you to add to your database.
Read please a very similar thread - Grouping Query Range.

Also, I guess you will benefit from reading the following articles:
Database Normalization and Table Structures
SQL JOINs

Regards,
Fish


这篇关于为时间范围分配数值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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