Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: HELP- Code for SQL Single Row Character Function?
On 30 Sep 2004 08:27:51 -0700, hliji_at_yahoo.com (Mario King) wrote:
>I'm trying to write a function long2ch() to convert
>table's LONG column to varchar2 so that I could run
>select * from tab where long2ch(long_col) like '%MY String%'.
>-- I want to make long2ch() similar to upper(), trim()...
If at all possible, get rid of the LONG column(s) once and for all.
Oracle has worked hard to eliminate the beast, and if you are on 9i+, it's as simple as
SQL> create table foo(c1 long);
SQL> alter table foo modify c1 clob;