plsql question

Started by Geoffreyabout 15 years ago2 messagesgeneral
Jump to latest
#1Geoffrey
lists@serioustechnology.com

I am trying to write a plsql routine that will delete a range of
characters based on their octal or hexadecimal values. Something like
the 'tr' shell command will do:

cat file| tr -d ['\177'-'\377']

Can't seem to figure this one out.

Pointers would be appreciated.

--
Until later, Geoffrey

"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson

#2Bill Thoen
bthoen@gisnet.com
In reply to: Geoffrey (#1)
Re: plsql question

On 2/10/2011 6:40 PM, Geoffrey Myers wrote:

I am trying to write a plsql routine that will delete a range of
characters based on their octal or hexadecimal values. Something like
the 'tr' shell command will do:

cat file| tr -d ['\177'-'\377']

Can't seem to figure this one out.

Pointers would be appreciated.

Would the string functions to_hex(), translate(), replace() and friends
work for you?
(see http://www.postgresql.org/docs/9.0/static/functions-string.html)