@PHOLHAD

DROP TABLE PHWMSG;
@EXECSQL


CREATE TABLE PHTAMT (            
    TABAMB  VARCHAR(4) NOT NULL,
    CODAMB  VARCHAR(8) NOT NULL,
    DESCRI  VARCHAR(100),
    DESAMB  VARCHAR(200),
    LOCAMB  VARCHAR(2),
    TIPINS  VARCHAR(2),
    NUMINS  VARCHAR(20),
    INDBLQ  VARCHAR(2),
PRIMARY KEY (TABAMB, CODAMB)
);
@EXECSQL

CREATE TABLE PHTAMT2 (              
    TABAMB  VARCHAR(4) NOT NULL,
    CODAMB  VARCHAR(8) NOT NULL,
    SEQRSC  VARCHAR(4) NOT NULL,
    FRISC1  VARCHAR(10),
    FRISC2  VARCHAR(10),
    DESRSC  VARCHAR(50),
    USOEPC  VARCHAR(2),
PRIMARY KEY (TABAMB, CODAMB, SEQRSC)
);
@EXECSQL


CREATE TABLE PHTAMT3 (              
    TABAMB  VARCHAR(4) NOT NULL,
    CODAMB  VARCHAR(8) NOT NULL,
    SEQRSC  VARCHAR(4) NOT NULL,
    SEQEPC  VARCHAR(4) NOT NULL,
    CODEPC  VARCHAR(20),
    DESCRI  VARCHAR(60),
    INDEFZ  VARCHAR(2),
PRIMARY KEY (TABAMB, CODAMB, SEQRSC, SEQEPC) 
);
@EXECSQL


CREATE TABLE PHCCDT3 (              
    CODEMP  VARCHAR(4) NOT NULL,
    CODCAD  VARCHAR(10) NOT NULL,
    SEQCDT  VARCHAR(4) NOT NULL,
    SEQEPC  VARCHAR(4) NOT NULL,
    CODEPC  VARCHAR(20),
    DESCRI  VARCHAR(60),
    INDEFZ  VARCHAR(2),
PRIMARY KEY (CODEMP, CODCAD, SEQCDT, SEQEPC)
);
@EXECSQL
