Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jan 10th, 2013  |  syntax: SQL  |  size: 2.88 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. CREATE TABLE "EOD"."TXN_HEADER"
  2. (
  3.    ORGU_CODE_CMPY varchar2(10) NOT NULL,
  4.    ORGU_CODE varchar2(10) NOT NULL,
  5.    TILL_SHORT_DESC varchar2(30) NOT NULL,
  6.    TXHD_TXN_NR DECIMAL(10) NOT NULL,
  7.    TXHD_STATE DECIMAL(5),
  8.    ORGU_CODE_ORIGINAL varchar2(10),
  9.    TILL_DESC_ORIG varchar2(30),
  10.    TXHD_ORIG_TXN_NR DECIMAL(10),
  11.    TXHD_SALE_PER_COD varchar2(60),
  12.    TXHD_TRADING_DATE CHAR(8),
  13.    TXHD_TXN_TYPE DECIMAL(22) NOT NULL,
  14.    TXHD_OPERATOR_CODE varchar2(60),
  15.    TXHD_TRAINING_MODE DECIMAL(38) DEFAULT 0  NOT NULL,
  16.    TXHD_VOIDED DECIMAL(38) DEFAULT 0  NOT NULL,
  17.    RSTY_TYPE varchar2(10),
  18.    RESN_CODE varchar2(10),
  19.    TXHD_VALUE_GROSS DECIMAL(38),
  20.    TXHD_VALUE_NETT DECIMAL(38),
  21.    TXHD_VAL_DISCABLE DECIMAL(38),
  22.    TXHD_VALUE_DUE DECIMAL(38),
  23.    TXHD_VALUE_CHANGE DECIMAL(38),
  24.    TXHD_VAL_ROUNDING DECIMAL(38),
  25.    TXHD_START_DATE CHAR(21),
  26.    TXHD_FINISH_DATE CHAR(21),
  27.    TXHD_VALUE_TAXABLE DECIMAL(38),
  28.    TXHD_VALUE_TAX DECIMAL(38),
  29.    TXHD_RECEIPT_ID varchar2(10),
  30.    CUST_CODE varchar2(100),
  31.    TXHD_VOID_TXN_NR DECIMAL(10),
  32.    TXHD_TAX_EXEMPT DECIMAL(38) DEFAULT 0  NOT NULL,
  33.    TXHD_TAX_EXMT_CERT varchar2(60),
  34.    LOYC_CARD_NO varchar2(100),
  35.    TXHD_SUSP_TXN_NR DECIMAL(10),
  36.    TXHD_TOTAL_TIME CHAR(21),
  37.    TXHD_CUST_DESIG varchar2(60),
  38.    TXHD_LOGON_STRING varchar2(60),
  39.    TXHD_ORIG_DATE CHAR(21),
  40.    LCOUNT DECIMAL(38) DEFAULT 0,
  41.    TXHD_EXTERNAL_REF varchar2(60),
  42.    TXHD_SUPER_CODE varchar2(10),
  43.    VALC_CODE varchar2(10),
  44.    TXHD_SOURCE_SYSTEM varchar2(10),
  45.    TXHD_SEAL_NUMBER varchar2(100),
  46.    TXHD_SUPER_DATE CHAR(21),
  47.    TXHD_TILL_STATUS DECIMAL(38),
  48.    TXHD_PUBLISH_ID DECIMAL(38),
  49.    TXHD_EARN_PTS DECIMAL(38),
  50.    TXHD_PROM_PTS DECIMAL(38),
  51.    TXHD_BONUS_PTS DECIMAL(38),
  52.    TXHD_DEFER_SDIS DECIMAL(38) DEFAULT 0  NOT NULL,
  53.    TXHD_EXPIRY_DATE CHAR(8),
  54.    TXHD_CARD_CHECK_OK DECIMAL(38),
  55.    TXHD_DESCRIPTION varchar2(2048),
  56.    TXHD_PICKUP_NR DECIMAL(38),
  57.    TXHD_CHG_CMPY_CODE varchar2(10),
  58.    TXHD_CHG_STOR_CODE varchar2(10),
  59.    TXHD_CHG_DEPT_CODE varchar2(10),
  60.    TXHD_CHG_EMP_CODE varchar2(10),
  61.    TXHD_TXNRECALL_REF varchar2(60),
  62.    CMPY_CODE_ORIGINAL varchar2(10),
  63.    TXHD_EXTERNAL_ACC varchar2(100),
  64.    SESSIONID DECIMAL(1),
  65.    KNZ varchar2(2) DEFAULT ' '  NOT NULL,
  66.    TIMESTAMP varchar2(20) DEFAULT ' ',
  67.    TXHD_LOYALTY_VALUE DECIMAL(38),
  68.    START_TIMESTAMP varchar2(20),
  69.    END_TIMESTAMP varchar2(20),
  70.    TXHD_IMAGE_VERSION varchar2(50),
  71.    TXHD_MAC_ADDRESS varchar2(60),
  72.    TXHD_AUD_COUNTER varchar2(128),
  73.    CONSTRAINT TXHD_PK PRIMARY KEY (ORGU_CODE_CMPY,ORGU_CODE,TILL_SHORT_DESC,TXHD_TXN_NR)
  74. )
  75. ;
  76. CREATE INDEX TXHD_TIMESTAMP ON "EOD"."TXN_HEADER"
  77. (
  78.   TIMESTAMP,
  79.   ORGU_CODE_CMPY
  80. )
  81. ;
  82. CREATE UNIQUE INDEX TXHD_PK ON "EOD"."TXN_HEADER"
  83. (
  84.   ORGU_CODE_CMPY,
  85.   ORGU_CODE,
  86.   TILL_SHORT_DESC,
  87.   TXHD_TXN_NR
  88. )
  89. ;
  90. CREATE INDEX TXHD_SE ON "EOD"."TXN_HEADER"
  91. (
  92.   ORGU_CODE,
  93.   TILL_SHORT_DESC,
  94.   SESSIONID,
  95.   KNZ,
  96.   TXHD_TXN_NR
  97. )
  98. ;