> Paul, > Thanks for your response. I'm open to any suggestion as I'm pulling my > hair > out trying to find out how to upload this data. My files can vary in > numbers > of rows and columns but the x and y axis always contain the same type of > metadata - in my case cost centre and cost item. A sample of the data > converted to csv would look like : > > cost_centre,stationery,postage,furniture,training,advertising > 1001,£10.56,£8,£500.99,£1500,£300.99 > 1002,£40.50,£12.35,£0,£0,£450 > > My database table is preloaded with a transposed version of the metadata > and > is waiting for the expenditure values : > > cost_centre | cost_item | spend > 1001 | stationery | .......................(would be populated > with 10.56) > 1002 | stationery | .......................(would be populated > with 40.50) > 1001 | postage | ......................(would be populated > with > 8) > 1002 | stationery | .......................(would be populated > with 12) > ..........etc. > > So I need to parse through the csv file regardless of how many rows or > columns and insert into my table in the form : > > UPDATE EXPENDITURE > > SET SPEND = 10.56 > > WHERE cost_centre = 1001 AND cost_item = stationery > > > > My attempts so far have been pretty retarded, if you can help at all I'd > really appreciate it.
Send a copy of the code that you have tried. It easier to help "fix" your code then it is to write the code for you. Plus you will learn more. Also direct all perl mail to the beginners list so that everyone can benefit. I have copied your message to the list. Paul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>