optionally enclosed by

我试了一下optionally enclosed by '"'

左边没引号右边有引号:成功,原样导入
111"
222""
333"""

左边有引号右边没引号:失败, second enclosure string not present
"44
""555
"""666

左右有相等的奇数个引号,成功,引号数=2n+1时导入数据带有n个引号
"777"
"""888"""

左右有相等的偶数个引号,失败, no terminator found after TERMINATED and ENCLOSED field
""999""
""""AAA""""

一边奇数一边偶数:失败, 错误信息为上述两种
"BBB""
""CCC"
"""DDD""
""EEE"""

两边不等的偶数:失败, no terminator found after TERMINATED and ENCLOSED field
""FFF""""
""""GGG""

两边不等的奇数:成功,引号数=2n+1时导入数据带有n个引号
"HHH"""
"""III"

总结:要么左边不能带引号;如果有引号左右都必须为奇数个

有sql脚本如下:use kdd99; create table kdd99_accounts ( account_id integer, district_id integer, frequency varchar(20), date DATE ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/kdd99_accounts.csv' into table kdd99_accounts CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; create table Kdd99_card( card_id integer, disp_id integer, issued DATE, type varchar(10) ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Kdd99_card.csv' into table Kdd99_card CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; create table Kdd99_disp( disp_id integer, client_id integer, account_id integer, type varchar(6) ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Kdd99_disp.csv' into table Kdd99_disp CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; create table Kdd99_trans( trans_id integer,account_id integer,date date,type varchar(2),operation varchar(20),amount long,balance long,k_symbol varchar(20),bank varchar(4),account long ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Kdd99_trans.csv' into table Kdd99_trans CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';请问如何验证客户开通信用卡之后,其账户余额相较于开卡之前是否有提升
05-26
有sql脚本如下:use kdd99; create table kdd99_accounts ( account_id integer, district_id integer, frequency varchar(20), date DATE ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/kdd99_accounts.csv' into table kdd99_accounts CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; create table Kdd99_card( card_id integer, disp_id integer, issued DATE, type varchar(10) ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Kdd99_card.csv' into table Kdd99_card CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; create table Kdd99_disp( disp_id integer, client_id integer, account_id integer, type varchar(6) ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Kdd99_disp.csv' into table Kdd99_disp CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; create table Kdd99_trans( trans_id integer,account_id integer,date date,type varchar(2),operation varchar(20),amount long,balance long,k_symbol varchar(20),bank varchar(4),account long ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Kdd99_trans.csv' into table Kdd99_trans CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';请问如何验证客户开通信用卡之后,其账户余额相较于开卡之前是否有提升
05-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值