sql - Oracle trim whitespace on the inside of a string -
i storing phone numbers varchar2 in system allow users input '+' characters infront of phone number if choose.
my regexp allows perfectly, when storing number in database want strip out whitespace user may enter.
my regexp allows following formats
+4470123456789 +447 0123456789 +447 01234 56789 01234567890 01234 567890 01234 567 890
i know resolve issue not letting users put whitespace in numbers, know personal experience how frustrating have validation error due silly formatting on client side. have tried using trim function on insert/update trigger have realised limited front , trailing whitespace, there other function in oracle use remove internal whitespace? or need write own function this?
any pointers appreciated.
you want try replace (telno, ' ', '')
.
Comments
Post a Comment