Everyone a great god, and the latest encounter a problem, try for two days, still can't solve, solution genuflect is begged
Background:
Company has a lot of report and BMS, involving some RawData, because before are scattered in the hands of each team, now through collection, put up some basic data, is Excel format, hope these basic data are imported into the Mysql database, so as to at any time in the future can query and update the corresponding data points strains,
Question:
1. A single basic data file has 566 field, 100000 rows of data, through import Navicat mysql when there is no way has been found so much field next, complains out of reaching requirements change field properties default is Varchar (255)
2. Think of the first approach, from mysql built a 566 field empty table first, and then through Navicat derivative according to come in, use the SQL statement creat table regardless of how to write an error, debug the along while also don't see why (the attached code)
3. The second way, there is no practice reading excel in python and then write the mysql installation of table
The CREATE TABLE ` mor `. ` mymor ` (
` L1_ACCT_ID ` FLOAT (50) NOT NULL,
NULL ` L1_ACCT_NAME ` Text (50),
NULL ` L1_ACCT_LCL_NM ` Text (50),
` L2_ACCT_ID ` Int (20) NULL,
NULL ` L2_ACCT_NAME ` Text (50),
NULL ` L2_ACCT_LCL_NM ` Text (50),
` L4_ACCT_ID ` Int (20) NULL,
NULL ` L4_ACCT_NAME ` Text (50),
NULL ` L4_ACCT_LCL_NM ` Text (50),
` EMPLOYEES_SIZE ` Int (20) NULL,
NULL ` ACCOUNT_TIER ` Text (50),
NULL ` SR_ASSIGNED_FLG ` Text (50),
` CITY ` Text (20) NULL,
` PROVINCE ` Text (20) NULL,
NULL ` COUNTRY_CODE ` Text (50),
NULL ` ACCT_CREATE_DATE ` Date (50),
` AMO ` FLOAT (20) NULL,
` CSG_AMO ` FLOAT (20) NULL,
` ISG_AMO ` FLOAT (20) NULL,
` SVR_AMO ` float (20) NULL,
` STO_AMO ` float (20) NULL,
` NWK_AMO ` float (20) NULL,
NULL ` DELL_IDC_FID ` Text (50),
` DELL_IDC 1 st Level 19 _en ` Text (50) NULL,
NULL ` DELL_IDC_SID ` Text (50),
` DELL_IDC 2nd Level 35 _en ` Text (50) NULL,
NULL ` DELL_IDC_TID ` Text (50),
` DELL_3rd Level 164 _cn ` Text (50) NULL,
NULL ` DELL_4rd Level ` Text (50),
` LOCK_RAD ` Text (20) NULL,
` CSG_LOCK_RAD ` Text (20) NULL,
` ISG_LOCK_RAD ` Text (20) NULL,
` SVR_LOCK_RAD ` Text (20) NULL,
` STO_LOCK_RAD ` Text (20) NULL,
` NWK_LOCK_RAD ` Text (20) NULL,
` ROLLING_RAD ` Text (20) NULL,
` CSG_ROLLING_RAD ` Text (20) NULL,
` ISG_ROLLING_RAD ` Text (20) NULL,
` SVR_ROLLING_RAD ` Text (20) NULL,
` STO_ROLLING_RAD ` Text (20) NULL,
` NWK_ROLLING_RAD ` Text (20) NULL,
` MKT_BU_calc ` Text (20) NULL,
` MKT_COUNTRY_calc ` Text (20) NULL,
` SLS_BU ` Text (20) NULL,
` SLS_BU_LEVEL1 ` Text (20) NULL,
` SLS_BU_LEVEL2 ` Text (20) NULL,
` SLS_BU_LEVEL3 ` Text (20) NULL,
` SLS_BU_LEVEL4 ` Text (20) NULL,
` SLS_CTRY_AREA ` Text (20) NULL,
NULL ` Sales Team ` Text (50),
` Sales Sub Team ` Text (50) NULL,
NULL ` RIM ` Text (50),
NULL ` ISM ` Text (50),
NULL ` ISR ` Text (50),
NULL ` ISR_Badge ` Text (50),
NULL ` AED ` Text (50),
NULL ` AEM ` Text (50),
NULL ` AE ` Text (50),
NULL ` TSRM ` Text (50),
NULL ` TSR ` Text (50),
NULL ` SCM ` Text (50),
NULL ` SC ` Text (50),
` Top_9 ` Text (20) NULL,
NULL ` Top_Acct ` Text (21),
` CSG_Top_Acct ` Text (22) NULL,
` ISG_Top_Acct ` Text (23), NULL,
` DCC_Top_Acct ` Text (24) NULL,
` STO_Top_Acct ` Text (25) NULL,
` CSG_ISR_ACQ ` Text (26) NULL,
` ISG_ISR_ACQ ` Text (27) NULL,
NULL ` QTW_Total_Rev ` FLOAT (50),
NULL ` QTW_1Q_Ago_Total_Rev ` FLOAT (50),
NULL ` QTW_4Q_Ago_Total_Rev ` FLOAT (50),
NULL ` 1 q_ago_total_rev ` float (50),
NULL ` 2 q_ago_total_rev ` float (50),
NULL ` 3 q_ago_total_rev ` float (50),
4 q_ago_total_rev ` ` float (50) NULL,
5 q_ago_total_rev ` ` float (50) NULL,
NULL ` 6 q_ago_total_rev ` float (50),
NULL ` 7 q_ago_total_rev ` float (50),
8 q_ago_total_rev ` ` float (50) NULL,
NULL ` 9 q_ago_total_rev ` float (50),
NULL ` 10 q_ago_total_rev ` float (50),
NULL ` 11 q_ago_total_rev ` float (50),
NULL ` 12 q_ago_total_rev ` float (50),
NULL ` QTW_CSG_Rev ` float (50),
NULL ` QTW_1Q_Ago_CSG_Rev ` float (50),
NULL ` QTW_4Q_Ago_CSG_Rev ` float (50),
NULL ` 1 q_ago_csg_rev ` float (50),
NULL ` 2 q_ago_csg_rev ` float (50),
NULL ` 3 q_ago_csg_rev ` float (50),
4 q_ago_csg_rev ` ` float (50) NULL,
5 q_ago_csg_rev ` ` float (50) NULL,
NULL ` 6 q_ago_csg_rev ` float (50),
NULL ` 7 q_ago_csg_rev ` float (50),
8 q_ago_csg_rev ` ` float (50) NULL,
NULL ` 9 q_ago_csg_rev ` float (50),
NULL ` 10 q_ago_csg_rev ` float (50),
NULL ` 11 q_ago_csg_rev ` float (50),
NULL ` 12 q_ago_csg_rev ` float (50),
NULL ` QTW_WS_Rev ` float (50),
NULL ` QTW_1Q_Ago_WS_Rev ` float (50),
NULL ` QTW_4Q_Ago_WS_Rev ` float (50),
NULL ` 1 q_ago_ws_rev ` float (50),
NULL ` 2 q_ago_ws_rev ` float (50),
NULL ` 3 q_ago_ws_rev ` float (50),
4 q_ago_ws_rev ` ` float (50) NULL,
5 q_ago_ws_rev ` ` float (50) NULL,
NULL ` 6 q_ago_ws_rev ` float (50),
NULL ` 7 q_ago_ws_rev ` float (50),
8 q_ago_ws_rev ` ` float (50) NULL,
NULL ` 9 q_ago_ws_rev ` float (50),
NULL ` 10 q_ago_ws_rev ` float (50),
NULL ` 11 q_ago_ws_rev ` float (50),
NULL ` 12 q_ago_ws_rev ` float (50),
NULL ` QTW_DT_Rev ` float (50),
NULL ` QTW_1Q_Ago_DT_Rev ` float (50),
NULL ` QTW_4Q_Ago_DT_Rev ` float (50),
NULL ` 1 q_ago_dt_rev ` float (50),
NULL ` 2 q_ago_dt_rev ` float (50),
NULL ` 3 q_ago_dt_rev ` float (50),
4 q_ago_dt_rev ` ` float (50) NULL,
5 q_ago_dt_rev ` ` float (50) NULL,
NULL ` 6 q_ago_dt_rev ` float (50),
NULL ` 7 q_ago_dt_rev ` float (50),
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull