Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Substring a long in SQL ?
But you can pass the long to an in-line function in your sql statement that
will return it:
FUNCTION FNGETLONGSUBSTR( ....... ) v_Long LONG;
v_nChars NUMBER;
BEGIN v_nChars := 50;
SELECT long_col INTO v_Long
FROM table
WHERE x = y
v_Desc := SUBSTR(LONG_COL,1, v_nChars ) || '...';
RETURN(v_Desc);
SELECT FNGETLONGSUBSTR( LONGCOL ) AS LONGSUBSTR, COL2, COL3..... FROM TABLE
"Phil Randolph" <Phil_Randolph_at_yahoo.com> wrote in message
news:c5c8fdf1.0210171416.4e9fd6d_at_posting.google.com...
> Is there any way to extract the first 1000 characters from a field of
> type long using straight SQL ?
>
> Thanks,
> Phil
Received on Fri Oct 18 2002 - 07:29:02 CDT