DROP TABLE IF EXISTS personinchargemaster_OLD; CREATE TABLE personinchargemaster_OLD As Select * from personinchargemaster; drop index PersonInChargeMaster_Index1 on personinchargemaster; drop index PersonInChargeMaster_Index2 on personinchargemaster; drop table if exists personinchargemaster cascade; create table personinchargemaster ( PersonCode decimal(8,0) unsigned not null comment '’S“–ŽÒƒR[ƒh' , DisplayOrder decimal(8,0) unsigned not null comment '•\Ž¦‡' , PersonName varchar(60) not null comment '’S“–ŽÒ–¼' , StartDate date not null comment 'Žg—pŠJŽn”NŒŽ“ú' , EndDate date comment 'Žg—pI—¹”NŒŽ“ú' , PassWord varchar(16) comment 'ƒpƒXƒ[ƒh' , SecurityManagement decimal(1,0) not null comment '‹@–§‹æ•ª' , SecCode decimal(2,0) unsigned not null comment '•ÛŒì‹æ•ª”Ô†' , MsgBackColor varchar(8) comment 'ƒƒbƒZ[ƒW”wŒiF' , DisplayString varchar(20) comment '•\Ž¦Eˆóü–¼Ì' , DepartmentCode decimal(5,0) unsigned comment '•”ƒR[ƒh' , MonthlySalary decimal(11,0) not null comment 'ŒŽ‹‹‹àŠz' , YearSalary decimal(12,0) not null comment '”N•î‹àŠz' , Qualification varchar(120) comment 'Ž‘Ši“ü—Í—“' , SealPrintName varchar(5) comment 'ˆóŠÓ•\Ž¦–¼' , EmployeeClassFlg decimal(1,0) not null comment 'ŽÐˆõ‹æ•ª' , LedgerFlg decimal(1,0) not null comment '‘ä’ ŒvŽZ‘ÎÛƒtƒ‰ƒO' , CommutingDistance decimal(5,2) not null comment '’ʋ΋——£' , CommuteCosts decimal(5,0) not null comment '’Ê‹ÎŒð’Ê”ï' , DeleteFlg decimal(1,0) not null comment '휃tƒ‰ƒO' , EntryDate datetime not null comment '“o˜^“ú•t' , UpdateDate datetime not null comment 'XV“ú•t' , constraint personinchargemaster_PKC primary key (PersonCode) ) comment '’S“–ŽÒƒ}ƒXƒ^' ; create index PersonInChargeMaster_Index1 on personinchargemaster(StartDate); create index PersonInChargeMaster_Index2 on personinchargemaster(DepartmentCode); Insert INTO personinchargemaster SELECT PersonCode , DisplayOrder , PersonName , StartDate , EndDate , PassWord , SecurityManagement , SecCode , MsgBackColor , DisplayString , DepartmentCode , MonthlySalary , YearSalary , Qualification , SealPrintName , EmployeeClassFlg , LedgerFlg , 0 , 0 , DeleteFlg , EntryDate , UpdateDate FROM personinchargemaster_OLD ; commit; DROP TABLE IF EXISTS SystemMaster_OLD; CREATE TABLE SystemMaster_OLD As Select * from SystemMaster; DROP TABLE IF EXISTS SystemMaster; -- ŠÇ—ƒ}ƒXƒ^ CREATE TABLE SystemMaster ( SystemCode decimal(3,0) unsigned not null comment '‰ïŽÐƒR[ƒh' , CompanyName1 varchar(60) not null comment '‰ïŽÐ–¼‚P' , CompanyName2 varchar(60) comment '‰ïŽÐ–¼‚Q' , CEOName varchar(60) not null comment '‘ã•\ŽÒŽ–¼' , CEOPositionName varchar(60) comment '‘ã•\ŽÒ–ðE–¼' , ZipCode varchar(8) not null comment '—X•Ö”Ô†' , Address1 varchar(60) not null comment 'ZŠ‚P' , Address2 varchar(60) comment 'ZŠ2' , Address3 varchar(60) comment 'ZŠ3' , PhoneNumber varchar(13) not null comment '“d˜b”Ô†' , FaxNumber varchar(13) comment 'FAX”Ô†' , HomePageURL varchar(120) comment 'ƒz[ƒ€ƒy[ƒWURL' , ConstructionExpenses decimal(4,2) not null comment 'HŽ–•”Œo”ï' , OfficeExpenses decimal(4,2) not null comment 'Ž––±ŠŒo”ï' , OperatingExpenses decimal(4,2) not null comment '‰c‹ÆŒo”ï' , ConsumptionTax decimal(4,2) not null comment 'Á”ïÅ' , CooperationRate decimal(4,2) not null comment '‹¦—Í‹à”ä—¦' , StatutoryWelfareRate decimal(4,2) not null comment '–@’è•Ÿ—˜”ï”ä—¦' , FuelPrice decimal(5,2) NOT NULL COMMENT '”R—¿ƒLƒ’P‰¿' , AreaDistance decimal(5,2) NOT NULL COMMENT 'Ž‘Þ’uêˆÚ“®‹——£' , ExcelSavePath varchar(120) comment 'Excel•Û‘¶ƒpƒX' , BusinessPeriod smallint(6) not null comment 'Œ»Ý‰c‹ÆŠú”' , ConstructionYear smallint(6) not null comment 'Œ»ÝHŽ–”N“x' , BusinessBeginningDate varchar(5) not null comment '‰c‹ÆŠúŠúŽñ“ú' , ConstructionBeginningDate varchar(5) not null comment 'HŽ–”N“xŠúŽñ“ú' , ConstructionNoBase decimal(1,0) not null comment 'HŽ–”Ô†Šî€’l' , SloganString1 varchar(100) comment '•WŒê1' , SloganString2 varchar(100) comment '•WŒê2' , SloganString3 varchar(100) comment '•WŒê3' , EntryDate datetime not null comment '“o˜^“ú•t' , UpdateDate datetime not null comment 'XV“ú•t' , constraint systemmaster_PKC primary key (SystemCode) ) COMMENT = 'ŠÇ—ƒ}ƒXƒ^'; Insert INTO SystemMaster SELECT SystemCode , CompanyName1 , CompanyName2 , CEOName , CEOPositionName , ZipCode , Address1 , Address2 , Address3 , PhoneNumber , FaxNumber , HomePageURL , ConstructionExpenses , OfficeExpenses , OperatingExpenses , ConsumptionTax , CooperationRate , StatutoryWelfareRate , 0 , 0 , ExcelSavePath , BusinessPeriod , ConstructionYear , BusinessBeginningDate , ConstructionBeginningDate , ConstructionNoBase , SloganString1 , SloganString2 , SloganString3 , EntryDate , UpdateDate FROM SystemMaster_OLD ; commit; insert into approvalmaster( SELECT 11 , DepartmentCode , SeqNo , DisplayOrder , ApprovalPerson , ApprovalAuthority , EntryDate , UpdateDate FROM approvalmaster where ApprovalCode = 99 ); insert into approvalmaster( SELECT 12 , DepartmentCode , SeqNo , DisplayOrder , ApprovalPerson , ApprovalAuthority , EntryDate , UpdateDate FROM approvalmaster where ApprovalCode = 99 ); delete from approvalmaster where ApprovalCode >= 98; commit;