Я делаю отчет о смене строк отчета У меня есть 3 смены:
shift1 starts at 7am and ends at 3pm
shift2 starts at 3pm and ends at 11pm
shift3 starts at 11pm and ends at 7am
Я должен создать отчет на основе смены. Например, если пользователь выбирает shift1 из выпадающего списка, в отчете должны отображаться все данные с 7:00 до 15:00.
Я могу получить данные для shift1 и shift2, но данные для shift3 я не могу получить, потому что
в смену 3 после 12:00 дата изменится.
Итак, как получить данные для shift3 и получить данные на основе даты в этих 4 таблицах
моя первая таблица содержит следующие данные (shift3 (11-7)):
Name Shiftname Operatorname Date plant Line Machine
--------- ------------ ------------ ---------- ------- ----- -------
Deepali Shift3(11-7) Operator 3 2011-06-07 Plant 1 Line1 mc1
Ashwini Shift3(11-7) Operator 3 2011-06-07 Plant 1 Line1 mc2
Antra Shift3(11-7) Operator 3 2011-06-07 Plant 1 Line2 mc3
Harshitha Shift3(11-7) Operator 3 2011-06-07 Plant 1 Line2 mc4
Pradeep Shift3(11-7) Operator 3 2011-06-07 Plant 2 Line3 mc5
Madhu Shift3(11-7) Operator 3 2011-06-07 Plant 2 Line3 mc6
Meena Shift3(11-7) Operator 3 2011-06-07 Plant 2 Line4 mc7
Suhas Shift3(11-7) Operator 3 2011-06-07 Plant 2 Line4 mc8
это моя таблица температур (shift3(11-7)
):
Temperature Time Date
----------- ----------------------- ----------
27 1900-01-01 23:34:56.000 2011-06-07
27.3 1900-01-01 23:36:56.000 2011-06-07
27.6 1900-01-01 23:38:56.000 2011-06-07
27.9 1900-01-01 23:40:56.000 2011-06-07
28.2 1900-01-01 23:42:56.000 2011-06-07
28.5 1900-01-01 23:44:55.000 2011-06-07
28.8 1900-01-01 23:46:55.000 2011-06-07
29.1 1900-01-01 23:48:55.000 2011-06-07
29.4 1900-01-01 23:50:55.000 2011-06-07
29.7 1900-01-01 23:52:55.000 2011-06-07
30 1900-01-01 23:54:55.000 2011-06-07
30 1900-01-01 23:56:55.000 2011-06-07
30.3 1900-01-01 23:58:55.000 2011-06-07
30.6 1900-01-01 00:00:55.000 2011-06-08
30.9 1900-01-01 00:02:55.000 2011-06-08
31.2 1900-01-01 00:04:55.000 2011-06-08
31.5 1900-01-01 00:06:55.000 2011-06-08
31.8 1900-01-01 00:08:55.000 2011-06-08
32.1 1900-01-01 00:10:55.000 2011-06-08
32.4 1900-01-01 00:12:55.000 2011-06-08
32.7 1900-01-01 00:14:55.000 2011-06-08
33 1900-01-01 00:16:55.000 2011-06-08
33.3 1900-01-01 00:18:55.000 2011-06-08
33.6 1900-01-01 00:20:55.000 2011-06-08
33.9 1900-01-01 00:22:55.000 2011-06-08
34.2 1900-01-01 00:24:55.000 2011-06-08
34.5 1900-01-01 00:26:55.000 2011-06-08
34.8 1900-01-01 00:28:55.000 2011-06-08
35.1 1900-01-01 00:30:55.000 2011-06-08
35.4 1900-01-01 00:32:55.000 2011-06-08
35.7 1900-01-01 00:34:55.000 2011-06-08
36 1900-01-01 00:36:55.000 2011-06-08
36.3 1900-01-01 00:38:55.000 2011-06-08
36.6 1900-01-01 00:40:55.000 2011-06-08
36.9 1900-01-01 00:42:55.000 2011-06-08
36.9 1900-01-01 00:44:55.000 2011-06-08
37.2 1900-01-01 00:46:55.000 2011-06-08
36.9 1900-01-01 00:48:55.000 2011-06-08
36.6 1900-01-01 00:50:55.000 2011-06-08
36.3 1900-01-01 00:52:55.000 2011-06-08
36 1900-01-01 00:54:55.000 2011-06-08
35.7 1900-01-01 00:56:55.000 2011-06-08
35.4 1900-01-01 00:58:55.000 2011-06-08
35.1 1900-01-01 01:00:55.000 2011-06-08
34.8 1900-01-01 01:02:55.000 2011-06-08
34.5 1900-01-01 01:04:55.000 2011-06-08
34.2 1900-01-01 01:06:55.000 2011-06-08
33.9 1900-01-01 01:08:55.000 2011-06-08
33.6 1900-01-01 01:10:55.000 2011-06-08
33.3 1900-01-01 01:12:55.000 2011-06-08
33 1900-01-01 01:14:55.000 2011-06-08
32.7 1900-01-01 01:16:55.000 2011-06-08
32.4 1900-01-01 01:18:55.000 2011-06-08
32.1 1900-01-01 01:20:55.000 2011-06-08
31.8 1900-01-01 01:22:55.000 2011-06-08
31.5 1900-01-01 01:24:55.000 2011-06-08
31.2 1900-01-01 01:26:55.000 2011-06-08
30.9 1900-01-01 01:28:55.000 2011-06-08
30.6 1900-01-01 01:30:55.000 2011-06-08
30.3 1900-01-01 01:32:56.000 2011-06-08
30 1900-01-01 01:34:55.000 2011-06-08
29.7 1900-01-01 01:36:56.000 2011-06-08
29.4 1900-01-01 01:38:55.000 2011-06-08
29.1 1900-01-01 01:40:55.000 2011-06-08
28.5 1900-01-01 03:03:02.000 2011-06-08
28.2 1900-01-01 03:05:02.000 2011-06-08
27.9 1900-01-01 03:07:02.000 2011-06-08
27.6 1900-01-01 03:09:02.000 2011-06-08
27.3 1900-01-01 03:11:02.000 2011-06-08
27 1900-01-01 03:13:02.000 2011-06-08
27 1900-01-01 03:15:02.000 2011-06-08
27 1900-01-01 03:17:02.000 2011-06-08
27 1900-01-01 03:19:02.000 2011-06-08
27 1900-01-01 03:21:03.000 2011-06-08
27 1900-01-01 03:23:02.000 2011-06-08
27 1900-01-01 03:25:02.000 2011-06-08
27 1900-01-01 03:27:02.000 2011-06-08
27 1900-01-01 03:29:02.000 2011-06-08
27 1900-01-01 04:33:06.000 2011-06-08
27.3 1900-01-01 04:35:07.000 2011-06-08
27.6 1900-01-01 04:37:06.000 2011-06-08
27.9 1900-01-01 04:39:07.000 2011-06-08
28.2 1900-01-01 04:41:06.000 2011-06-08
28.5 1900-01-01 04:43:06.000 2011-06-08
28.8 1900-01-01 04:45:06.000 2011-06-08
29.1 1900-01-01 04:47:07.000 2011-06-08
29.4 1900-01-01 04:49:06.000 2011-06-08
29.7 1900-01-01 04:51:06.000 2011-06-08
29.7 1900-01-01 04:53:06.000 2011-06-08
30 1900-01-01 04:55:06.000 2011-06-08
30.3 1900-01-01 04:57:06.000 2011-06-08
30.6 1900-01-01 04:59:07.000 2011-06-08
27 1900-01-01 05:33:04.000 2011-06-08
27.3 1900-01-01 05:35:04.000 2011-06-08
27.6 1900-01-01 05:37:04.000 2011-06-08
27.9 1900-01-01 05:39:04.000 2011-06-08
28.2 1900-01-01 05:41:04.000 2011-06-08
28.5 1900-01-01 05:43:04.000 2011-06-08
28.8 1900-01-01 05:45:04.000 2011-06-08
29.1 1900-01-01 05:47:04.000 2011-06-08
29.4 1900-01-01 05:49:04.000 2011-06-08
29.7 1900-01-01 05:51:04.000 2011-06-08
29.7 1900-01-01 05:53:04.000 2011-06-08
30 1900-01-01 05:55:04.000 2011-06-08
30.3 1900-01-01 05:57:04.000 2011-06-08
30.6 1900-01-01 05:59:04.000 2011-06-08
То же самое для давления и ph, будут изменены только столбец давления и значение столбца ph.
Я храню данные в базе данных, там 4 таблицы, дата - мой главный ключ в этом.
Я должен связать эти данные на основе даты.
Я отображаю данные в виде сетки.
Я хочу, чтобы мой вывод был таким:
Temperature Time Date Pressure
----------- ----------------------- ---------- --------
27 1900-01-01 23:34:56.000 2011-06-07 30
27.3 1900-01-01 23:36:56.000 2011-06-07 30.1
27.6 1900-01-01 23:38:56.000 2011-06-07 30.2
27.9 1900-01-01 23:40:56.000 2011-06-07 30.3
28.2 1900-01-01 23:42:56.000 2011-06-07 30.4
28.5 1900-01-01 23:44:55.000 2011-06-07 30.5
28.8 1900-01-01 23:46:55.000 2011-06-07 30.6
29.1 1900-01-01 23:48:55.000 2011-06-07 .
29.4 1900-01-01 23:50:55.000 2011-06-07 .
29.7 1900-01-01 23:52:55.000 2011-06-07 .
30 1900-01-01 23:54:55.000 2011-06-07 .
30 1900-01-01 23:56:55.000 2011-06-07 .
30.3 1900-01-01 23:58:55.000 2011-06-07
30.6 1900-01-01 00:00:55.000 2011-06-08
30.9 1900-01-01 00:02:55.000 2011-06-08
31.2 1900-01-01 00:04:55.000 2011-06-08
31.5 1900-01-01 00:06:55.000 2011-06-08
31.8 1900-01-01 00:08:55.000 2011-06-08
32.1 1900-01-01 00:10:55.000 2011-06-08
32.4 1900-01-01 00:12:55.000 2011-06-08
32.7 1900-01-01 00:14:55.000 2011-06-08
33 1900-01-01 00:16:55.000 2011-06-08
33.3 1900-01-01 00:18:55.000 2011-06-08
33.6 1900-01-01 00:20:55.000 2011-06-08
33.9 1900-01-01 00:22:55.000 2011-06-08
34.2 1900-01-01 00:24:55.000 2011-06-08
34.5 1900-01-01 00:26:55.000 2011-06-08
34.8 1900-01-01 00:28:55.000 2011-06-08
35.1 1900-01-01 00:30:55.000 2011-06-08
35.4 1900-01-01 00:32:55.000 2011-06-08
35.7 1900-01-01 00:34:55.000 2011-06-08
36 1900-01-01 00:36:55.000 2011-06-08
36.3 1900-01-01 00:38:55.000 2011-06-08
36.6 1900-01-01 00:40:55.000 2011-06-08
36.9 1900-01-01 00:42:55.000 2011-06-08
36.9 1900-01-01 00:44:55.000 2011-06-08
37.2 1900-01-01 00:46:55.000 2011-06-08
36.9 1900-01-01 00:48:55.000 2011-06-08
36.6 1900-01-01 00:50:55.000 2011-06-08
36.3 1900-01-01 00:52:55.000 2011-06-08
36 1900-01-01 00:54:55.000 2011-06-08
35.7 1900-01-01 00:56:55.000 2011-06-08
35.4 1900-01-01 00:58:55.000 2011-06-08
35.1 1900-01-01 01:00:55.000 2011-06-08
34.8 1900-01-01 01:02:55.000 2011-06-08
34.5 1900-01-01 01:04:55.000 2011-06-08
34.2 1900-01-01 01:06:55.000 2011-06-08
33.9 1900-01-01 01:08:55.000 2011-06-08
33.6 1900-01-01 01:10:55.000 2011-06-08
33.3 1900-01-01 01:12:55.000 2011-06-08
33 1900-01-01 01:14:55.000 2011-06-08
32.7 1900-01-01 01:16:55.000 2011-06-08
32.4 1900-01-01 01:18:55.000 2011-06-08
32.1 1900-01-01 01:20:55.000 2011-06-08
31.8 1900-01-01 01:22:55.000 2011-06-08
31.5 1900-01-01 01:24:55.000 2011-06-08
31.2 1900-01-01 01:26:55.000 2011-06-08
30.9 1900-01-01 01:28:55.000 2011-06-08
30.6 1900-01-01 01:30:55.000 2011-06-08
30.3 1900-01-01 01:32:56.000 2011-06-08
30 1900-01-01 01:34:55.000 2011-06-08
29.7 1900-01-01 01:36:56.000 2011-06-08
29.4 1900-01-01 01:38:55.000 2011-06-08
29.1 1900-01-01 01:40:55.000 2011-06-08
28.5 1900-01-01 03:03:02.000 2011-06-08
28.2 1900-01-01 03:05:02.000 2011-06-08
27.9 1900-01-01 03:07:02.000 2011-06-08
27.6 1900-01-01 03:09:02.000 2011-06-08
27.3 1900-01-01 03:11:02.000 2011-06-08
27 1900-01-01 03:13:02.000 2011-06-08
27 1900-01-01 03:15:02.000 2011-06-08
27 1900-01-01 03:17:02.000 2011-06-08
27 1900-01-01 03:19:02.000 2011-06-08
27 1900-01-01 03:21:03.000 2011-06-08
27 1900-01-01 03:23:02.000 2011-06-08
27 1900-01-01 03:25:02.000 2011-06-08
27 1900-01-01 03:27:02.000 2011-06-08
27 1900-01-01 03:29:02.000 2011-06-08
27 1900-01-01 04:33:06.000 2011-06-08
27.3 1900-01-01 04:35:07.000 2011-06-08
27.6 1900-01-01 04:37:06.000 2011-06-08
27.9 1900-01-01 04:39:07.000 2011-06-08
28.2 1900-01-01 04:41:06.000 2011-06-08
28.5 1900-01-01 04:43:06.000 2011-06-08
28.8 1900-01-01 04:45:06.000 2011-06-08
29.1 1900-01-01 04:47:07.000 2011-06-08
29.4 1900-01-01 04:49:06.000 2011-06-08
29.7 1900-01-01 04:51:06.000 2011-06-08
29.7 1900-01-01 04:53:06.000 2011-06-08
30 1900-01-01 04:55:06.000 2011-06-08
30.3 1900-01-01 04:57:06.000 2011-06-08
30.6 1900-01-01 04:59:07.000 2011-06-08
27 1900-01-01 05:33:04.000 2011-06-08
27.3 1900-01-01 05:35:04.000 2011-06-08
27.6 1900-01-01 05:37:04.000 2011-06-08
27.9 1900-01-01 05:39:04.000 2011-06-08
28.2 1900-01-01 05:41:04.000 2011-06-08
28.5 1900-01-01 05:43:04.000 2011-06-08
28.8 1900-01-01 05:45:04.000 2011-06-08
29.1 1900-01-01 05:47:04.000 2011-06-08
29.4 1900-01-01 05:49:04.000 2011-06-08
29.7 1900-01-01 05:51:04.000 2011-06-08
29.7 1900-01-01 05:53:04.000 2011-06-08
30 1900-01-01 05:55:04.000 2011-06-08
30.3 1900-01-01 05:57:04.000 2011-06-08
30.6 1900-01-01 05:59:04.000 2011-06-08 .
Может ли кто-нибудь помочь мне в этом?