If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

i need to convert the above so i can insert it directly in to an sql database it need to look like this exactly not sure what is the best way to do it either somekind of script to convert the file or a sql script new to all this but getting there at the moment i have to do it manually which just takes me hours thanks in advance for your help

Don't bother; what you are asking is trivial. But we'll need some more information. What exactly is the format of the source file? What do each of those columns represent and how do they map to the resulting table? And we'll need to know what tools you have available. Perl? PHP? Or are you using a Windows box?

“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Script for parsing text

Your specification example has some inconsistencies like how the data items in the input text file are to map onto the mysql table.

Below is some python code that does mostly what you want. I wrote it on the fly and it isn't tested and as is the way with code may need a little work Anyway it gives you a framework that you should be able to bang into what you want done.

I would have included the correct command construction and tested it if the example had been more clear. In Python indenting is important. The indent on this wiki isn't clear so you may need to check the indents