CREATE TABLE [dbo].[OrderedData]([RowNum] [TINYINT] NOT NULL PRIMARY KEY,[EMPLID] [TINYINT] NOT NULL, [Name] [CHAR](2) NOT NULL,[PUNCHDATE] [DATE] NOT NULL, [PUNCHTIME] [TIME](0) NOT NULL, [DEVICETYPE] [VARCHAR](3) NOT NULL)
The data:
INSERT [dbo].[OrderedData] ([RowNum], [EMPLID], [Name], [PUNCHDATE], [PUNCHTIME], [DEVICETYPE])
VALUES
(1, 70, 'GT', CAST(N'2014-05-28' AS Date), CAST(N'07:46:53' AS Time), N'IN'),
(2, 70, 'GT', CAST(N'2014-05-28' AS Date), CAST(N'07:46:58' AS Time), N'IN'),
(3, 70, 'GT', CAST(N'2014-05-28' AS Date), CAST(N'07:47:50' AS Time), N'IN'),
(4, 70, 'GT', CAST(N'2014-05-28' AS Date), CAST(N'12:16:19' AS Time), N'OUT'),
(5, 70, 'GT', CAST(N'2014-05-28' AS Date), CAST(N'12:17:55' AS Time), N'OUT'),
(6, 70, 'GT', CAST(N'2014-05-28' AS Date), CAST(N'12:24:27' AS Time), N'IN'),
(7, 70, 'GT', CAST(N'2014-05-28' AS Date), CAST(N'16:32:57' AS Time), N'OUT'),
(8, 70, 'GT', CAST(N'2014-05-28' AS Date), CAST(N'16:33:57' AS Time), N'OUT'),
(9, 70, 'GT', CAST(N'2014-05-28' AS Date), CAST(N'16:33:59' AS Time), N'OUT'),
(10, 72, 'MS', CAST(N'2014-05-28' AS Date), CAST(N'07:47:50' AS Time), N'IN'),
(11, 72, 'MS', CAST(N'2014-05-28' AS Date), CAST(N'12:16:19' AS Time), N'OUT'),
(12, 88, 'ZE', CAST(N'2014-05-28' AS Date), CAST(N'07:47:50' AS Time), N'IN'),
(13, 88, 'ZE', CAST(N'2014-05-28' AS Date), CAST(N'07:48:40' AS Time), N'IN'),
(14, 88, 'ZE', CAST(N'2014-05-28' AS Date), CAST(N'12:16:19' AS Time), N'OUT')