Hi My wife has brought home an excel spread sheet to create a mail merge, however the person who set up the data up has put the address in one column (albeit separated by commas i.e. 23 The Road, Somewhere, er2 3ry. I stupidly said now worries I can right a bit code which will import them to separate columns for you!
Should have made sure i know how to do it first! Well I think I do kind of. I imported the data into a table called address, which has three columns cname, address, tel. I have set up a table called newAddress with the following tables cname, add1, add2, add3, add4, add5, add6, add7 (as far as I can see the addresses are no longer than seven) As this is for a ms word mailmerge only, I do not need to specify town, postcode etc so the above columns will be fine. I know i will have to query the old address and loop through them whilst looping through the address column, find the commas and insert it into the next available add field in the new table (not sure about this bit) How can i insert the addresses in the next available column e.g. Address 1 is 4 parts long so beginning with add1 insert upto add4 Address 2 is 6 parts long so beginning with add1 insert upto add6 I know i can use listlen to find the end of the addresses, but Iâm not sure how to implement the insert statement. Will I need to use listgetat? Any ideas are greatly appreciated Jason ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321083 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

