--ABS-157488
CREATE TABLE DBM_SENDTRACK_RESULT
(
  CONTAINER_PRIMARYID VARCHAR2(24) NOT NULL,
  SCANSTATION         VARCHAR2(12) NOT NULL,
  STATUS              NUMBER NOT NULL,
  NOTENUMBER          NUMBER NULL,
  SEQUENCE            NUMBER NULL,
  SYSTEMUSER          NUMBER DEFAULT 0 NOT NULL,
  TIMESTAMP           DATE DEFAULT SYSDATE NOT NULL
);
ALTER TABLE DBM_SENDTRACK_RESULT
  ADD CONSTRAINT PK_DBM_SENDTRACK_RESULT PRIMARY KEY (CONTAINER_PRIMARYID, SCANSTATION, TIMESTAMP);

CREATE INDEX XIS1CONTAINERSCAN ON CONTAINERSCAN (TRUNC(SCANTIMESTAMP));
CREATE INDEX XSP2CLIENTDELNOTE ON CLIENTDELIVERYNOTE (CLIENT_LINK_ID, NVL(CLOSINGDATE,TO_DATE('2099-12-31 00:00:00', 'yyyy-mm-dd hh24:mi:ss')));