I fugured out that I needed to put (name of col1, name of col2....) instead of (col1, 
col2).
Duhhhhhh   Sorry
My question is, how can I take a log file that has 25 columns of data and tell mysql 
to only load column 1, column 3, and column 7 from the raw log file?

Sorry for being so dense.

Thanks,
David


David McBride writes:
>I need to load data from a log file.  The file is a space seperated
>file.  I can already ignore the first 7 lines (that are commnet lines),
>but what I can not seem to do is:
>1. get load data to use the space seperated format.
>2. only load certain columns.  
>
>I tried: mysql> LOAD DATA INFILE 'persondata.txt'
>    ->           INTO TABLE persondata (col1,col2,...);

David,
     Based upon the manual for 4.0.17 the following syntax would fit
your description:

        LOAD DATA INFILE 'persondata.txt'
            INTO TABLE persondata
            FIELDS TERMINATED by ' '
            (col1,col2,...);

You may need the LOCAL key word if you want the client to read the
data file.
                Brad Eacker ([EMAIL PROTECTED])



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to