 IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MDS_RETURNRECORD') 
 CREATE TABLE T_MDS_RETURNRECORD (
	FID BIGINT DEFAULT 0 NOT NULL,
	FORDERPOOLID BIGINT DEFAULT 0 NOT NULL,
	FSALBILLNO VARCHAR(50) NOT NULL DEFAULT ' ',
	FSALBILLSEQ VARCHAR(50) NOT NULL DEFAULT ' '
);

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MDS_RETURNRECORDENTRY') 
 CREATE TABLE  T_MDS_RETURNRECORDENTRY (
	FID BIGINT DEFAULT 0 NOT NULL,
	FENTRYID BIGINT DEFAULT 0 NOT NULL,
	FSEQ BIGINT NOT NULL DEFAULT 0,
	FRETURNMANS BIGINT DEFAULT 0 NOT NULL,
	FRETURNDETAIL VARCHAR(255) NOT NULL DEFAULT ' ',
	FRETURNDATE DATETIME
);