On Apr 4, 2005, at 3:52 PM, Rhino wrote:

Stefano,

I'm copying this to the mailing list. I think it is a lot better if we have
discussions of this kind on the mailing list so that others can also learn
from them, either now or in the future via the mailing list archive.


I'm glad to hear that you solved your data loading problem. You've chosen an
unusual solution. I'm not sure why it is important that the size of the
column is exactly 595 characters but that is up to you. As I understand it,
the BLOB and TEXT column types only store the amount of data that you give
them; if I am right about that, your BLOB or TEXT column will only contain
595 characters of data, not 595 characters of data plus thousands of
trailing blanks. (If I am misreading this, I hope someone else will jump in
and correct me!) That means that your data will be in one field and you you
won't have to concatenate it.

I think you missed this in the original post:

I receive this (very large) file from an external organization and this
file is made
without separators bitween fields. I know only the exact lenght of each
field.

Importing from a fixed-width file requires a table with precisely matching column widths. I believe his (clever) solution was to import into 3 columns with the correct total width as a first pass, then CONCAT those 3 columns into one TEXT column.


Michael


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



Reply via email to