Split an address line

Discuss your general Proclaim related queries here.
Posts: 11
Joined: Tue Dec 13, 2016 7:23 pm
Has thanked: 1 time

Split an address line

Post by HC_1 »

I am looking to split out a house number or name from the first line of an address and place the house number/name into a separate field to the address line. The format being used currently includes a comma after the house number/name e.g. House Name/Number, Street Name.

I have tried using the LISTITEM function with the deliminator as the comma but this is returning the full address line each time. Can anyone assist as to the easiest way of achieving this please ?

Thanks in advance.

Posts: 466
Joined: Fri Jun 15, 2012 12:44 pm
Has thanked: 15 times
Been thanked: 47 times

Re: Split an address line

Post by revellbikes »

I'd probably approach it with the SPLIT command and cycle through each character from character 1 then test to see if it CONTAINS ","

Adding one character each time to the split length, minus 1 once you've hit the comma so you don't get the house name / number and the comma.