IanWaterman
Programmer
I need to move a formula from Crystal Reports into an Oracle view.
In the UK post codes can be
AB99 8AA ie alpha alpha number plus space and second set
or
A9 8AA ie alpha number
The last set is always 3 characters and preceded by a space. The first set can be 2, 3 or 4 characters in length.
I need to extract first 1 or two alphas, next one or two digits and the final set.
Final set is no problem, for the first part I did this is Crystal by checking whether character 2 was a number
If isnumeric(mid({RPT_BFS_PROPERTY_SI.RISKADDRESS5}, 2, 1)) = true then Left({RPT_BFS_PROPERTY_SI.RISKADDRESS5},1)
ELSE
Left({RPT_BFS_PROPERTY_SI.RISKADDRESS5},2)
I can replace the left and mid functions with substr, but
There does not appear to be an isnumeric function within Oracle, can any one suggest how I can overcome this?
Thank you
Ian
In the UK post codes can be
AB99 8AA ie alpha alpha number plus space and second set
or
A9 8AA ie alpha number
The last set is always 3 characters and preceded by a space. The first set can be 2, 3 or 4 characters in length.
I need to extract first 1 or two alphas, next one or two digits and the final set.
Final set is no problem, for the first part I did this is Crystal by checking whether character 2 was a number
If isnumeric(mid({RPT_BFS_PROPERTY_SI.RISKADDRESS5}, 2, 1)) = true then Left({RPT_BFS_PROPERTY_SI.RISKADDRESS5},1)
ELSE
Left({RPT_BFS_PROPERTY_SI.RISKADDRESS5},2)
I can replace the left and mid functions with substr, but
There does not appear to be an isnumeric function within Oracle, can any one suggest how I can overcome this?
Thank you
Ian