Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> single quote in instr Oracle PL/SQL

single quote in instr Oracle PL/SQL

From: crazyideas <crazyideas_at_gmail.com>
Date: 23 May 2005 05:33:13 -0700
Message-ID: <1116851593.567932.216490@z14g2000cwz.googlegroups.com>


hi all,
 i'm working on a PL/SQL function (Oracle 9i) which should remove special characters from a variable before entering it. the function is supposed to remove all special characters except for - (hyphen) and /(forward slash). It is possible to search the variable using IF and OR. for example,
If( (instr(variable_name,'~') > 0) OR (instr(variable_name,'`') > 0)..... Then
But the list is huge (32 to be exact)

I have 2 questions:
1. is there a short cut to this on 9i? i've heard that 10g supports something like regexp_instr.

2. if the answer to 1 is no, how do we catch a single quote in the instr method? is there an escape character for it?

thanks,
 (gone)crazy. Received on Mon May 23 2005 - 07:33:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US