0
MySQL 5.1 데이터베이스로 CSV 파일을 가져 오려고합니다.MySQLIMPORT 16 진수 값
테이블을 생성하는 스크립트입니다 : 내가 사용하고 명령을 가져 오는 것입니다
0X10004299300,1,7,1324542626.182691780,0.0,1324542627.76399180,1,3
0X1000429BF00,1,7,1324542656.188777040,0.0,1324542657.136454760,1,3
0X1000429CB00,1,7,1324542663.269024060,0.0,1324542663.292035400,1,3
0X1000429F200,1,7,1324542686.177864720,0.0,1324542687.45881600,1,3
0X100042A4000,1,7,1324542716.178234960,0.0,1324542717.645671220,1,3
0X100042A6800,1,7,1324542746.173958660,0.0,1324542747.66159900,1,3
....
은 다음과 같습니다이 내가 session_hdr 테이블로 가져 tyring하고있는 데이터가
CREATE TABLE `session_hdr` (
`id` bigint(20) unsigned NOT NULL,
`type` smallint(5) unsigned NOT NULL,
`session_start_time` decimal(20,8) unsigned DEFAULT NULL,
`session_end_time` decimal(20,8) unsigned DEFAULT NULL,
`session_last_update_time` decimal(20,8) unsigned DEFAULT NULL,
`session_flag` tinyint(3) unsigned DEFAULT NULL,
`version` tinyint(3) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1$$
:
mysqlimport --ignore-lines=1 -c id,type,session_start_time,session_end_time,session_last_update_time,session_flag,version databaseName1 session_hdr.csv
나는 다음과 같은 메시지를 reveive 명령을 실행
:mysqlimport: Error: 1265, Data truncated for column 'id' at row 1, when using table: session_hdr
왜 위의 명령으로 오류가 발생하는지 누가 알 수 있습니까?
작은 x로 '0x'가 될 필요가 없습니까? –
@Pekka 소문자 x ... 동일한 결과로 변경했습니다. 나는 또한 헥스를 완전히 제거하려고 시도했는데 1에서 시작하여 증가했지만 여전히 도움이되지 못했습니다. – Dave