Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Script Created by Hamid
- Created Date: 2022-Nov-10
- Update Date: 2024-Feb-17
- */
- USE [dssPro]
- GO
- /****** Object: Table [dbo].[attLog] ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- SET ANSI_PADDING ON
- GO
- CREATE TABLE [dbo].[attLog](
- [ID] [varchar] NULL,
- [CHANNEL_ID] [varchar](80) NULL,
- [CHANNEL_NAME] [varchar](50) NULL,
- [OWNER_CODE] [varchar](90) NULL,
- /*[OWNER_NAME] [varchar](50) NULL,*/
- [CARD_NUMBER] [varchar](50) NULL,
- [SWIPE_TIME_UTC] [bigint] NULL, /* As per DSS Pro, this is supposed to be int. However, the length is too long, so bigint datatype only works */
- [SWIPE_ID] [varchar](64) NULL,
- [ENTEROREXIT] [int] NULL,
- [OPEN_TYPE] [int] NULL,
- [EN_NAME] [varchar](200) NULL,
- [TEL] [varchar](50) NULL,
- [GENDER] [int] NULL,
- [IDENTIFICATION_NUM] [varchar](50) NULL,
- [datetimestd] AS (dateadd(second,CONVERT([bigint],[SWIPE_TIME_UTC])/(1000),CONVERT([datetime],'1-1-1970 00:00:00'))) /* This formula converts from bigint data type to readable date-time. However, it is in UTC time, and it can be changed */
- ) ON [PRIMARY]
- GO
- SET ANSI_PADDING OFF
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement