drop table mseg;
CREATE TABLE mseg (
mandt text,
mblnr text,
mjahr text,
zeile text,
bwart text,
charg text,
menge text,
budat_mkpf timestamp,
cputm_mkpf time,
hashResult text,
rowNum serial,
PRIMARY KEY (mandt,mblnr,mjahr,zeile)
)
Distributed by (mandt,mblnr,mjahr,zeile);

alter table mseg add column aufnr text;

alter table mseg add column kdauf text;
alter table mseg add column kdpos text;
alter table mseg add column matnr text;
