Home > database >  About essentially every fixed time (such as a minute) only take an algorithm of data
About essentially every fixed time (such as a minute) only take an algorithm of data

Time:11-10

8:01 points, data such as the picture, I just want to get to the first data, namely the 2019-11-04 08:01:54 8:02 as long as I get to the line 6 data, a great god, please help to look at, the syntax should how to write?

Thank you very much!





 

/* * * * * * Object: a Table [dbo] [tbm_tmp_importdata] Script Date: 2020/11/9 16:41:00 * * * * * */
The CREATE TABLE [dbo] [tbm_tmp_importdata] (
[addressid] [char] (20) NULL,
[calendartime] [char] (19) NULL,
[datastatus] [smallint] NULL,
[datatype] [smallint] NOT NULL,
[Dr] [smallint] NULL,
[exceptionflag] [smallint] NULL,
[pk_corp] [char] (4) NOT NULL,
[pk_importdata] [varchar] (20) NOT NULL,
[pk_machine] [char] (20) NULL,
[pk_psndoc] [char] (20) NOT NULL,
[timecardid] [varchar] (100), NULL,
[ts] [char] (19) NULL
) ON the (PRIMARY)
GO
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '08:01:54 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002927064', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:11)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '08:01:55 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002927065', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:11)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '08:01:56 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002927066', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:11)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '08:01:57 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002927067', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:11)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '08:01:58 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002927068', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:11)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '08:02:04 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002927071', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:11)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '08:02:05 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002927072', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:11)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '10:02:26 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002928743', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:12)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '10:09:44 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002928884', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:13)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '15:02:53 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002931998', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:21)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '15:09:52 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002932141', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:22)
INSERT [dbo] [tbm_tmp_importdata] ([addressid], [calendartime], [datastatus], [datatype], [Dr.], [exceptionflag], [pk_corp], [pk_importdata], [pk_machine], [pk_psndoc], [timecardid], [ts]) VALUES (NULL, N '17:38:09 2019-11-04', 2, 0, 0, 0, N '1001', N '10012019110002951751', NULL, N '1001 v1100000001a4mqv', N '102142', N '2019-11-20 10:37:25)
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related