Home > database >  When the query table like this kind of situation is how cause?
When the query table like this kind of situation is how cause?

Time:10-11

Structure like this:
My_Code, my_A1, my_A2,... My_A400

No export import, is completely normal, query when no error,
But through into outfile export,

Select * from stock_table_static
Into outfile 'D:/SQL_0_0_0_0_0_0_0_0_0_/_new out. TXT' CHARACTER SET UTF8 (note: no effect, export or ANSI format)
Fields terminated by '\ t' OPTIONALLY ENCLOSED by '"' lines terminated by '\ n';
Then open the TXT text, copy the data into excel spreadsheet, modify some data, then export to TXT text 2,
These texts with utraledit open when abnormal tips, there are some question marks open? , can't you want to delete,




Import is the statement import

The SET GBK NAMES;
The load data local infile 'D:/SQL_0_0_0_0_0_0_0_0_0_/_new/in. TXT'
Into the table stock_table_static
CHARACTER SET UTF8
Fields terminated by '\ t'
Lines terminated by '\ n'
Ignore 1 lines
(my_Code my_StockRating, my_StockRating_tmp my_Date, my_Fund, my_Shares,... . Unnecessary);

Suggests that there is a lot of these fields is empty, is the default is ", feel this could be a reason,




This is the query


How to eliminate these exceptions, it will pile up
Please some directions, thank you,

CodePudding user response:

Try to reveal the CSV format directly, TXT and excel in some system and version is going to have a problem
  • Related