Hello,

is it possible to import data into a MySQL-DB from a text-file which does
not have separating characters (like a comma, semicolon or tab)?

I have a .csv-file in which each column has a different constant lenght
(so many characters or digits) that I need to import.

For example:

00721617  20040625      1000  Z
00721617  20040626      1000  Z
00721617  20040625      1000 OP
...............................
         ^10       ^20        ^30

Now I would like to read this into my database into certain fields. First
four digits should go to Field1, the next six should go to Field2 and so
on.

I checked out the LOAD DATA INFILE syntax but couldn't find anything. I
cannot use the FIELDS TERMINATED BY option.

Is there a straightforward way to do this or do I have to load it into one
large field and seperate the fields by using MySQL's string functions?

Thanks in advance for any suggestions!

Sebastian

-- 

Once a problem is defined - it is half way solved. (Henry Ford)


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

Reply via email to