Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Need substring of a long field - help please
Hi Amy,
Though you didn't specify what you're doing, I assume (reluctantly) that
you are using SQL*PLUS.
If so, I don't have any ideas, but I do know what you are doing with SUBSTR
is not allowed.
On the other hand if you can use PL/SQL you could declare a variable of 255 characters (Could be up to 32000) then select your LONG into it and you're done. Or you could do any other string function on the PL/SQL variable.
IE:
Declare var_255 VARCHAR2(255); BEGIN SELECT Long_DataType INTO var_225 FROM your_table; -- Do other stuff. END;
Hope this is helpful.
Alex
Amy Grant wrote in message <01bd79d4$2505b2c0$1565a8c0_at_agrant.3si.com>...
>I have a field with the datatype of long and I need the first 255
>characters of it. I get an error of ORA-00932: inconsistent datatypes when
>I try it. Any suggestions on how I can do this?
>
>I would really appreciate it if you could email to agrant_at_3si.com.
>
>Thanks,
>
>Amy
Received on Thu May 07 1998 - 19:51:03 CDT
![]() |
![]() |