Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE view
- CREATE TABLE [dbo].[PAMTx](
- [SequenceId] [int] IDENTITY(1,1) NOT NULL,
- [CustomerId] [smallint] NOT NULL,
- [MeterId] [int] NOT NULL,
- [Bay] [int] NOT NULL,
- [Expiry] [datetime] NOT NULL,
- [Duration] [int] NOT NULL,
- [TopUp] [bit] NOT NULL,
- [TransactionType] [int] NOT NULL,
- [AmountCent] [int] NOT NULL,
- [Received] [datetime] NOT NULL,
- [LastProcessed] [datetime] NULL,
- [LastResult] [int] NULL,
- [Attempt] [int] NOT NULL,
- [TRANSDATETIME] [datetime] NULL,
- [MaxReachedAt] [datetime] NULL,
- [TIMECREDIT] [int] NULL,
- CREATE TABLE [dbo].[Meters](
- [CustomerID] [smallint] NOT NULL,
- [AreaID] [tinyint] NOT NULL,
- [MeterID] [int] NOT NULL,
- [SMSNumber] [varchar](22) NULL,
- [MeterStatus] [tinyint] NOT NULL,
- [TimeZoneID] [tinyint] NOT NULL,
- [MeterRef] [int] NOT NULL,
- [EmporiaKey] [char](32) NULL,
- [MeterName] [varchar](20) NULL,
- [Location] [varchar](50) NULL,
- [Description] [varchar](50) NULL,
- [GSMNumber] [varchar](16) NOT NULL,
- [SchedServTime] [smallint] NOT NULL,
- [RSFName] [varchar](128) NULL,
- [RSFDateTime] [smalldatetime] NULL,
- [BarCode] [varchar](20) NULL,
- [Latitude] [float] NULL,
- [Longitude] [float] NULL,
- [ProgramName] [varchar](16) NULL,
- [MaxBaysEnabled] [smallint] NULL,
- [MeterType] [tinyint] NULL,
- [GlobalMeterID] [bigint] NULL,
- [BayStart] [smallint] NULL,
- [BayEnd] [smallint] NULL,
- [MeterGroup] [tinyint] NULL,
- [MParkID] [int] NULL,
- CONSTRAINT [PK_Meters] PRIMARY KEY CLUSTERED
- (
- [CustomerID] ASC,
- [AreaID] ASC,
- [MeterID] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- CREATE TABLE [dbo].[MeterMapping](
- [MeterMappingId] [int] NOT NULL,
- [SpaceId] [int] NOT NULL,
- [DuncanCustomerId] [int] NOT NULL,
- [DuncanAreaId] [int] NOT NULL,
- [DuncanMeterId] [int] NOT NULL,
- [DuncanBayId] [int] NOT NULL,
- [Remark] [nvarchar](50) NULL,
- [CreatedDateTime] [datetime] NOT NULL,
- [VendorId] [int] NULL,
- PRIMARY KEY CLUSTERED
- (
- [MeterMappingId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement