c.sql 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. create table `sapLog` (
  2. id int(11) not null auto_increment,
  3. name varchar(56) not null default ''comment '接口类型',
  4. SysName varchar(255) not null default ''comment ,
  5. url varchar(128) not null default '' ,
  6. status varchar(56) not null default ''comment '状态',
  7. msgtext varchar(256) not null default ''comment '消息',
  8. param text not null default '',
  9. created_at datetime not null default '0000-00-00 00:00:00'comment '创建时间',,
  10. flag int(11) not null default 0,
  11. primary key (id),
  12. key (name),
  13. key (flag),
  14. key (created_at)
  15. );
  16. create table temDict (
  17. CostCenter values(50) not null default '',
  18. CostCenter_name values(128) not null default '',
  19. personal varchar(128) not null default '',
  20. CostCenter_type varchar(50) not null default '',
  21. company_code varchar(56) not null default '' ,
  22. business_scopes varchar(56) not null default '',
  23. currency_code varchar(50) not null default '',
  24. ProfitCenter varchar(128) not null default '',
  25. stage varchar(50) not null default '',
  26. factory_code varchar(56) not null default '' ,
  27. factory_name varchar(56) not null default '',
  28. market_group_code varchar(50) not null default '' ,
  29. market_group_name varchar(56) not null default '',
  30. company_name varchar(112) not null default '',
  31. index (factory_name)
  32. unique index (factory_code)
  33. )
  34. create table sys_detail_log (
  35. id int(11) not null auto_increment primary key ,
  36. name varchar(50) not null default '',
  37. code varchar(50) not null default '',
  38. error_text text default '',
  39. index (name),
  40. index (code)
  41. )ENGINE=InnoDB DEFAULT CHARSET=utf8 comment 'sap日志明细'
  42. insert into temDict (factory_code, factory_name, company_code, company_name) values
  43. CREATE UNIQUE INDEX temDict_factory_code ON temDict(factory_code);
  44. create table temDict_costcenter (
  45. CostCenter_code varchar(50) not null default '',
  46. CostCenter_name varchar(50) not null default '',
  47. factory_name varchar(50) not null default ''
  48. )
  49. CREATE TEMPORARY table dept_Data ( CostCenter_code VARCHAR(50),center_name varchar(50));
  50. CREATE TEMPORARY table if not exists temDict_CostCenter (CostCenter_code VARCHAR
  51. CREATE TEMPORARY table if not exists part_Data (old_partcode VARCHAR(50),new_partcode varchar(50),unit varchar(50),issave integer default 0);
  52. create temporary table cost_center_temp(code varchar(50),name varchar(50),type varchar(50));
  53. update department d join cost_center_temp c on d.name =c.name
  54. set d.CostCenter_code =c.code
  55. where d.parentid =115
  56. mysql -ueq -h192.168.61.42 -P3306 -p'Xdmy@1234' eq