IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_ADMINDIVISIONLOG_L')
CREATE TABLE T_BD_ADMINDIVISIONLOG_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FORIGINFULLNAME VARCHAR(1024) DEFAULT ' ' NOT NULL,
FORIGINNAME VARCHAR(255) DEFAULT ' ' NOT NULL,
FORIGINDESCRIPTION VARCHAR(255) DEFAULT ' ' NOT NULL
);
EXEC P_ALTERPK 'PK_T_BD_ADMINDIVISIONLOG_L', 'T_BD_ADMINDIVISIONLOG_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_ADMINLOG_L') CREATE INDEX IDX_BD_ADMINLOG_L ON T_BD_ADMINDIVISIONLOG_L ( FID );

