CREATE COLUMN TABLE "SBODEMOPT"."OBPL" ("BPLId" INTEGER CS_INT NOT NULL , "BPLName" NVARCHAR(200) NOT NULL , "BPLFrName" NVARCHAR(200), "VATRegNum" NVARCHAR(12), "RepName" NVARCHAR(15), "Industry" NVARCHAR(20), "Business" NVARCHAR(20), "Address" NVARCHAR(254), "AddressFr" NVARCHAR(254), "MainBPL" NVARCHAR(1) DEFAULT 'N', "TxOffcNo" NVARCHAR(3), "Disabled" NVARCHAR(1) DEFAULT 'N', "LogInstanc" INTEGER CS_INT DEFAULT 0, "UserSign2" SMALLINT CS_INT, "UpdateDate" LONGDATE CS_LONGDATE, "DflCust" NVARCHAR(15), "DflVendor" NVARCHAR(15), "DflWhs" NVARCHAR(8), "DflTaxCode" NVARCHAR(8), "RevOffice" NVARCHAR(100), "TaxIdNum" NVARCHAR(32), "TaxIdNum2" NVARCHAR(32), "TaxIdNum3" NVARCHAR(32), "AddtnlId" NVARCHAR(32), "CompNature" INTEGER CS_INT DEFAULT -1, "EconActT" INTEGER CS_INT DEFAULT -1, "CredCOrig" NVARCHAR(2), "IPIPeriod" NVARCHAR(2), "CoopAssocT" INTEGER CS_INT DEFAULT -1, "PrefState" NVARCHAR(3), "ProfTax" INTEGER CS_INT DEFAULT -1, "CompQualif" INTEGER CS_INT DEFAULT -1, "DeclType" INTEGER CS_INT DEFAULT -1, "AddrType" NVARCHAR(100), "Street" NVARCHAR(100), "StreetNo" NVARCHAR(100), "Building" NVARCHAR(100), "ZipCode" NVARCHAR(20), "Block" NVARCHAR(100), "City" NVARCHAR(100), "State" NVARCHAR(3), "County" NVARCHAR(100), "Country" NVARCHAR(3), "PmtClrAct" NVARCHAR(15), "CommerReg" NVARCHAR(60), "DateOfInc" LONGDATE CS_LONGDATE, "SPEDProf" NVARCHAR(2), "EnvTypeNFe" INTEGER CS_INT DEFAULT -1, "Opt4ICMS" NVARCHAR(1) DEFAULT 'N', "AliasName" NCLOB MEMORY THRESHOLD 1000, "GlblLocNum" NVARCHAR(50), "TaxRptFrm" LONGDATE CS_LONGDATE, "Suframa" NVARCHAR(100), "DfltResWhs" NVARCHAR(8), "SnapshotId" INTEGER CS_INT DEFAULT 0, "BPLNum" INTEGER CS_INT DEFAULT 0, PRIMARY KEY ("BPLId")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE UNIQUE INDEX "OBPL_NAME" ON "SBODEMOPT"."OBPL" ( "BPLName" ASC )