Convert Single Field Into Fixed Number Of Columns Using Function
Posted on 2006-11-22
I would like to convert data from a field into a series of columns using a function. The object is to achieve a comma seperated file in a fixed format for import into a third party system.
The data would be typically Surname, Forename, Mailing Name, Address, Country, Post Code. However I would like the address which may contain any number of lines to be returned as seperate fields rather than a single column. The data has to be consistent across the entire export.
Contact 1 Address= "Vicky Arms, Wellington Road, Cheswick"
Contact 2 Address = "No1, Armitage Apartments , Peninsula Way, Wickcombe"
Function would need to return seperate columns:
Address1 Address2 Address3 Address4
Vicky Arms Wellington Road Cheswick
No1 Armitage Apartments Peninsula Way Wickcombe