First of all I am very much a newbie with MySQL.
I am trying to create some tables and then read in some data from a .csv
file using load data infile 'filename.csv'
The data in the .csv file has actually come from another database system.
I have two problems which I haven't been able to find my way around.
In many cases there are missing values for particular fields. If I declare
that field or column to be CHAR(m) then I can read the data in using the
load command. However in a number of cases I want the field to be INT of
some sort. If in the create table statement I declare the column to be INT
however, I am unable to successfully read the data in. This is curious
because I know it was written out from the source database with an INT
declaration.
I have some dates which are in the incorrect format, as dd/mm/yyyy. Is
there any way of having them recognised as dates?
For both of these problems my intended workaround is to create a new
column from the problem column which has the attributes I want. I am not
sure how possible that is at this point, being very inexperienced with
MySQL.
Any advice would be most welcome, if only a pointer to the appropriate
location in the documentation.
David Scott
_________________________________________________________________
David Scott Department of Statistics, Tamaki Campus
The University of Auckland, PB 92019
Auckland 1142, NEW ZEALAND
Phone: +64 9 373 7599 ext 86830 Fax: +64 9 373 7000
Email: [EMAIL PROTECTED]
Graduate Officer, Department of Statistics
Director of Consulting, Department of Statistics
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]