1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Austin, TX
    Rep Power

    Question load data infile

    how can i use load data infile to do the following

    data file has 5 fields:

    table has 4 columns
    table colums = (a,b,c,e)

    load data infile 'file.txt' into table 'this_table' (a,b,c,,e)

    will not work ? is it posable to make it work ?
    I want to skip the empty column in the text file.
    On a Linux box....

    Note: bcp is a microsoft program and will not run on Linux.
    Last edited by deterset; November 4th, 2003 at 09:39 AM.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Woodland Hills, Los Angeles County, California, USA
    Rep Power
    You can use bcp to import the data and specify to skip a column by using a format file. See http://msdn.microsoft.com/library/de...p_bcp_61et.asp for the bcp utiltity. At the bottom of the page is a link that tells you how to make/use format files. Hope this helps
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo