[EMAIL PROTECTED] (Pedro Oliveira) writes:
> I need to import a fixed width txt to a my sql database, I
> know how to do that with a coma separated value.
> any1 knows how i can do this easilly or know some software to do this?
> any help would be appreciated.

*nix or windows? If the file is tab separated, I guess you can use
excel or something and export it to comma separated. On *nix, you have
an abundance of utilities, e.g. tr(1).

When you say fixed width, I guess it's not tab separated, however,

# 345678901234567890123456789012345678901234567890
word1    word2     word3     someword4 another5

or something like that. Then you can e.g. use perl (or for that sake
PHP) and the substr function to parse the data and spit them out
either in sql, directly into the database or comma separated (or in
whichever format you desire).

Subtlety is the art of saying what you think and getting out of the way
before it is understood.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to