Advertisement
unzvqxnnfuvs

Untitled

Feb 17th, 2025 (edited)
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 1.14 KB | None | 0 0
  1. /*
  2. Script Created by Hamid
  3. Created Date: 2022-Nov-10
  4. Update Date: 2024-Feb-17
  5. */
  6.  
  7. USE [dssPro]
  8. GO
  9. /****** Object:  Table [dbo].[attLog]    ******/
  10. SET ANSI_NULLS ON
  11. GO
  12. SET QUOTED_IDENTIFIER ON
  13. GO
  14. SET ANSI_PADDING ON
  15. GO
  16. CREATE TABLE [dbo].[attLog](
  17.     [ID] [varchar] NULL,
  18.     [CHANNEL_ID] [varchar](80) NULL,
  19.     [CHANNEL_NAME] [varchar](50) NULL,
  20.     [OWNER_CODE] [varchar](90) NULL,
  21.     /*[OWNER_NAME] [varchar](50) NULL,*/
  22.     [CARD_NUMBER] [varchar](50) NULL,
  23.     [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 */
  24.     [SWIPE_ID] [varchar](64) NULL,
  25.     [ENTEROREXIT] [int] NULL,
  26.     [OPEN_TYPE] [int] NULL,
  27.     [EN_NAME] [varchar](200) NULL,
  28.     [TEL] [varchar](50) NULL,
  29.     [GENDER] [int] NULL,
  30.     [IDENTIFICATION_NUM] [varchar](50) NULL,
  31.     [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 */
  32. ) ON [PRIMARY]
  33.  
  34. GO
  35. SET ANSI_PADDING OFF
  36. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement