Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. CREATE view
  2.  
  3. CREATE TABLE [dbo].[PAMTx](
  4. [SequenceId] [int] IDENTITY(1,1) NOT NULL,
  5. [CustomerId] [smallint] NOT NULL,
  6. [MeterId] [int] NOT NULL,
  7. [Bay] [int] NOT NULL,
  8. [Expiry] [datetime] NOT NULL,
  9. [Duration] [int] NOT NULL,
  10. [TopUp] [bit] NOT NULL,
  11. [TransactionType] [int] NOT NULL,
  12. [AmountCent] [int] NOT NULL,
  13. [Received] [datetime] NOT NULL,
  14. [LastProcessed] [datetime] NULL,
  15. [LastResult] [int] NULL,
  16. [Attempt] [int] NOT NULL,
  17. [TRANSDATETIME] [datetime] NULL,
  18. [MaxReachedAt] [datetime] NULL,
  19. [TIMECREDIT] [int] NULL,
  20.  
  21. CREATE TABLE [dbo].[Meters](
  22. [CustomerID] [smallint] NOT NULL,
  23. [AreaID] [tinyint] NOT NULL,
  24. [MeterID] [int] NOT NULL,
  25. [SMSNumber] [varchar](22) NULL,
  26. [MeterStatus] [tinyint] NOT NULL,
  27. [TimeZoneID] [tinyint] NOT NULL,
  28. [MeterRef] [int] NOT NULL,
  29. [EmporiaKey] [char](32) NULL,
  30. [MeterName] [varchar](20) NULL,
  31. [Location] [varchar](50) NULL,
  32. [Description] [varchar](50) NULL,
  33. [GSMNumber] [varchar](16) NOT NULL,
  34. [SchedServTime] [smallint] NOT NULL,
  35. [RSFName] [varchar](128) NULL,
  36. [RSFDateTime] [smalldatetime] NULL,
  37. [BarCode] [varchar](20) NULL,
  38. [Latitude] [float] NULL,
  39. [Longitude] [float] NULL,
  40. [ProgramName] [varchar](16) NULL,
  41. [MaxBaysEnabled] [smallint] NULL,
  42. [MeterType] [tinyint] NULL,
  43. [GlobalMeterID] [bigint] NULL,
  44. [BayStart] [smallint] NULL,
  45. [BayEnd] [smallint] NULL,
  46. [MeterGroup] [tinyint] NULL,
  47. [MParkID] [int] NULL,
  48.  
  49.  
  50. CONSTRAINT [PK_Meters] PRIMARY KEY CLUSTERED
  51. (
  52. [CustomerID] ASC,
  53. [AreaID] ASC,
  54. [MeterID] ASC
  55. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  56. ) ON [PRIMARY]
  57.  
  58. CREATE TABLE [dbo].[MeterMapping](
  59. [MeterMappingId] [int] NOT NULL,
  60. [SpaceId] [int] NOT NULL,
  61. [DuncanCustomerId] [int] NOT NULL,
  62. [DuncanAreaId] [int] NOT NULL,
  63. [DuncanMeterId] [int] NOT NULL,
  64. [DuncanBayId] [int] NOT NULL,
  65. [Remark] [nvarchar](50) NULL,
  66. [CreatedDateTime] [datetime] NOT NULL,
  67. [VendorId] [int] NULL,
  68. PRIMARY KEY CLUSTERED
  69. (
  70. [MeterMappingId] ASC
  71. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  72. ) ON [PRIMARY]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement