If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysqlimport

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-09, 17:42
chrismol chrismol is offline
Registered User
 
Join Date: Dec 2009
Posts: 1
mysqlimport

I am using mysqlimport to insert data into a table from a tab-delimited txt file. I am wondering if mysqlipmort requires that every column in the target table be in the txt file in the same order as the table?

I frequently import data into tables with many columns (more than 30) and I don't always have data for every column. I end up leaving those columns empty in my txt file just to have a placeholder for each column. It is very time consuming to setup every column in the txt file.

It would be very cool if mysqlimport would allow me to just import the fields that I have data for allow the remaining fields to be null or take the default value.

Does anyone know if mysqlimport allows this?

C
Reply With Quote
  #2 (permalink)  
Old 12-11-09, 02:45
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
nope
becuase it'd be virtually impossible to code the import file for this. there is no way I could conceive that you would be bale to make an import process flexible enough to decide off its own bat whcih fields go where if there are fields missing in the input stream

if you don't have data for the column then supply a null value, usually this is a comma followed by another comma if you are using CSV
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On