Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I'm having trouble in getting an alphanumeric word from a string, i have a column with addresses and i need to know whether the last word in that whole string is a pincode. so last word in the below column after ", " is a pincode.
Cannon Street, 25 Walbrook, London, EC4N 8AF |
27 Poultry (Meet By Turkish Bank In Princes Street), London, EC2R 8AJ |
1-7 Snowsfields, LONDON, SE1 3SU |
The Grove, Chandlers Cross, RICKMANSWORTH, WD3 4TG |
You could test with len
If(Len(SubField(SubField(field,',',-1),' ',-1)=3,'Pincode','Missing')
But you have to be sure about len
Hi
try to use this expression
SubField(SubField(field,',',-1),' ',-1)
No, I want to test if there is a pincode in the address in some cases the address columns are in the below way.
Cannon Street, 25 Walbrook, London, EC4N 8AF |
27 Poultry (Meet By Turkish Bank In Princes Street), London, EC2R 8AJ |
1-7 Snowsfields, LONDON |
The Grove, Chandlers Cross, RICKMANSWORTH |
*st Pancras Eurostar |
You could test with len
If(Len(SubField(SubField(field,',',-1),' ',-1)=3,'Pincode','Missing')
But you have to be sure about len
What if i want to specify the length between some range for suppose i want to get the for some pincodes are 3 digits and some are 4, could you please help me with this?
If(Len(SubField(SubField(field,',',-1),' ',-1)=3 or Len(SubField(SubField(field,',',-1),' ',-1)=4,'Pincode','Missing')