Re: Importing Text File Into mySQL

2006-11-17 Thread Visolve DB Team
4:35 AM Subject: Importing Text File Into mySQL I have a text file with over 500K rows of data in it. The problem is that the data is no seperated by commas but instead occupy a certain amount of characters. So for instance: ID 1 -11 NAME 12-50 COMPANY_NAME 51-100 ... How would you parse import this

Re: Importing Text File Into mySQL

2006-11-17 Thread Dan Nelson
In the last episode (Nov 17), John Kopanas said: > On 11/17/06, Dan Nelson <[EMAIL PROTECTED]> wrote: > >In the last episode (Nov 17), John Kopanas said: > >> I have a text file with over 500K rows of data in it. The problem > >> is that the data is no seperated by commas but instead occupy a > >>

Re: Re: Importing Text File Into mySQL

2006-11-17 Thread John Kopanas
I am trying to figure out how this would work? How does LOAD DATA figure out when one column begins and another ends when some of the data are addresses with spaces in them? On 11/17/06, Dan Nelson <[EMAIL PROTECTED]> wrote: In the last episode (Nov 17), John Kopanas said: > I have a text file

Re: Importing Text File Into mySQL

2006-11-17 Thread Dan Nelson
In the last episode (Nov 17), John Kopanas said: > I have a text file with over 500K rows of data in it. The problem is > that the data is no seperated by commas but instead occupy a certain > amount of characters. So for instance: > > ID 1 -11 > NAME 12-50 > COMPANY_NAME 51-100 > ... > > How

Re: Importing Text File Into mySQL

2006-11-17 Thread Bruce Ferrell
I did a little shell script to do it. the key was the shell variable IFS: Normally IFS=" " to make it work right I set it as follows: IFS=" " Yes, thats a newline between the quotes John Kopanas wrote: I have a text file with over 500K rows of data in it. The problem is that the data is

Importing Text File Into mySQL

2006-11-17 Thread John Kopanas
I have a text file with over 500K rows of data in it. The problem is that the data is no seperated by commas but instead occupy a certain amount of characters. So for instance: ID 1 -11 NAME 12-50 COMPANY_NAME 51-100 ... How would you parse import this data into mysql? Thanks for your help :