PROMPT Creating table REFLIGHT_BAG_HIST_TEMP

CREATE TABLE reflight_bag_hist_temp (
   flight_order                  NUMBER(6,0),
   flight_id                     NUMBER(10,0) NOT NULL,
   flight_no                     CHAR(8),
   flight_date                   CHAR(5),
   flight_sch_time               CHAR(4),
   bag_tag                       CHAR(10),
   pax_id                        NUMBER(10,0),
   pax_inits                     CHAR(4),
   pax_surname                   CHAR(27),
   pax_dest                      CHAR(3),
   pax_class                     CHAR(1),
   uld_no                        CHAR(10),
   rl                            VARCHAR2(3),
   fs                            CHAR(3),
   wtref                         VARCHAR2(30),
   row_create_time               date,
   row_date_time                 date,
   cuser                         varchar2(30),
   muser                         varchar2(30),
   mterm                         varchar2(64),
   source                        varchar2(8),
   to_be_archived                varchar2(1),
   appn_row_id                   number(18) not null,
   system_id                     number(4) default 0 not null
);

alter table reflight_bag_hist_temp add ( constraint reflight_bag_hist_temp_pk primary key (appn_row_id) using index tablespace &1._indexes);

COMMENT ON TABLE REFLIGHT_BAG_HIST_TEMP IS 'This table contains  temporary working data for the reflighting processing';

COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.BAG_TAG IS  'Ten digit bag tag number';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.FLIGHT_DATE IS  'Flight date';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.FLIGHT_ID IS  'Flight identifier';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.FLIGHT_NO IS  'Flight number';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.FLIGHT_ORDER IS  'Flight order';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.FLIGHT_SCH_TIME IS  'Flight scheduled time';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.FS IS  'Fault Station (airport code)';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.PAX_CLASS IS  'Passenger class';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.PAX_DEST IS  'Passenger destination';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.PAX_ID IS  'Passenger identifier';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.PAX_INITS IS  'Passenger initials';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.PAX_SURNAME IS  'Passenger surname';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.RL IS  'Reason for Loss code';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.ULD_NO IS  'ULD number';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.WTREF IS  'WorldTracer reference number for bag';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.CUSER IS 'The user who created the row';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN REFLIGHT_BAG_HIST_TEMP.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';
