var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Remove non-numerics from a string
I apologize as Iam sure this has been asked and answered before, but the search function keeps erroring out on me.
How can I remove non-numeric characters from a string (or extract the numeric characters)?
For example if the string is "Number of calls 9" I would want to return "9". Not all values in the common will have a numeric character.
Use the translate function:
SELECT translate(upper(theField), ''0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ ','0123456789')
Last edited by shammat; 02-15-06 at 16:51.
For some reason that is still leaving the alpha characters, though from everything I have read on the function it looks like it should work.
Got it working using this:
'1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ- ','1234567890') from table
Thanks for the help!
Last edited by cdols; 02-15-06 at 18:01.