CREATE COLUMN TABLE "SBODEMOPT"."AISI" ("DocEntry" INTEGER CS_INT NOT NULL , "DocNum" INTEGER CS_INT NOT NULL , "Series" INTEGER CS_INT, "PostDate" LONGDATE CS_LONGDATE, "DocDate" LONGDATE CS_LONGDATE, "DocStatus" NVARCHAR(1) DEFAULT 'O', "Revised" NVARCHAR(1) DEFAULT 'N', "OrgRefNo" NVARCHAR(100), "OrgRefEty" INTEGER CS_INT, "OrgDocDate" LONGDATE CS_LONGDATE, "TransId" INTEGER CS_INT, "Comments" NVARCHAR(254), "ObjType" NVARCHAR(20), "SrcLoc" INTEGER CS_INT, "SrcLocName" NVARCHAR(100), "SrcGSTIN" NVARCHAR(15), "TarLoc" INTEGER CS_INT DEFAULT 0, "TarLocName" NVARCHAR(100), "TarGSTIN" NVARCHAR(15), "ISDEntry" INTEGER CS_INT, "DataSource" NVARCHAR(1) DEFAULT 'N', "UserSign" SMALLINT CS_INT, "LogInstanc" INTEGER CS_INT DEFAULT 0 NOT NULL , "CreateDate" LONGDATE CS_LONGDATE, "UserSign2" SMALLINT CS_INT, "UpdateDate" LONGDATE CS_LONGDATE, "JrnlMemo" NVARCHAR(254), "Handwrtten" NVARCHAR(1) DEFAULT 'N', "PIndicator" NVARCHAR(10) NOT NULL , "BPLId" INTEGER CS_INT, "BPLName" NVARCHAR(200), "VATRegNum" NVARCHAR(32), PRIMARY KEY ("DocEntry", "LogInstanc")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE UNIQUE INDEX "AISI_INDEX" ON "SBODEMOPT"."AISI" ( "DocNum" ASC, "PIndicator" ASC, "LogInstanc" ASC )