Split an address line

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

Split an address line

Post by HC_1 » Sat Mar 23, 2019 6:21 pm

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.

revellbikes
Posts: 444
Joined: Fri Jun 15, 2012 12:44 pm
Has thanked: 14 times
Been thanked: 45 times

Re: Split an address line

Post by revellbikes » Sun Mar 24, 2019 8:40 pm

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.

Post Reply