I'm currently using the following statement to split address columns
SUBSTR(STREET, 1, INSTR(STREET, ' ')-1) AS HouseNumber,
SUBSTR(STREET, INSTR(STREET, ' ')+1) AS Street,
In this case, 50 Main St is split into two columns
50, Main St
Is it possible to add a third column to split letters out from the house number?
In this case 50D Main St is out put like 50,D,Main St AND 50 Main St would be output like 50,,Main St
I also need to strip leading spaces from the Street after the split or replace instances of more than one space with a single space prior to the split
Last, if I have an House_Number values of
100
200
50
How can I sort them in order so 50 comes before 100 opposed to after 200?
Thanks!!!
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.