Rhino, I've answered only to you and not to the list too, because I've already
posted the same words answering to another mailing list user :-)
My first problem is that the txt files I need to import have a fix structure
without separators. After the field of 595 characters, there is another
field of three character. I've tryied with txt data type but in that way
I've lost the last field during import operations. Then, I cannot understood
why, even with field seto to longtext, the string were cat at 255th character.
But I've not investigated too much in this last aspect. Major problem, however,
for me, were the lost of the last filed of three chars.
Apropos the last problem, I think that the next priority for me will be
to study php! And that surely will solve the problem!
Thanks a lot for your help!
Stefano

>-- Messaggio originale --
>From: "Rhino" <[EMAIL PROTECTED]>
>To: "mysql" <mysql@lists.mysql.com>,
>       <[EMAIL PROTECTED]>
>Subject: Re: Load data infile and text fields
>Date: Mon, 4 Apr 2005 15:52:06 -0400
>
>
>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.
>
>With regards to your second problem, I could certainly do what you describe
>in a Java program - provided the MS Word documents are small enough to
fit
>inside a BLOB! - but I'm not so sure how to do it without using a
>programming language.
>
>I just had a look at LOAD DATA INFILE to see if it can handle BLOBs but
it
>says explicitly that it *CANNOT* handle BLOBs. Since the mysqlimport utility
>is just a front-end to LOAD DATA INFILE, I assume it has the same
>limitation. However, this page http://dev.mysql.com/doc/mysql/en/blob.html
>has some discussion of techniques to load BLOBs into tables. See the user
>comments in the bottom part of the page. All of them seem to use programming
>languages though.
>
>The user comments also raise an important issue: sometimes, it is better
>to
>store only a URL pointing to the document in the database and keep the
>actual document in the file system rather than the database. They suggest
>some guidelines to help you decide which approach is best for you. If you
>haven't considered these guidelines, you should. It might turn out that
it
>is better for you to leave the documents outside of MySQL.
>
>Sorry I couldn't be more help.
>
>Rhino



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

Reply via email to