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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Acessing LONG field

Re: Acessing LONG field

From: <markp7832_at_my-dejanews.com>
Date: Fri, 30 Apr 1999 12:53:32 GMT
Message-ID: <7gc94b$ki6$1@nnrp1.dejanews.com>


In article <GgaW2.245$9C2.13976_at_wagner.videotron.net>,   "Steven Lévesque" <steven.levesque_at_videotron.ca> wrote:
> I need to acess a substring contained in a field defined as LONG. Since the
> SUBSTR or any other String functions won't work with LONG, how can I access
> the data?
>
> Information on any method, even using a transfer to a temporary table would
> be appreciated.
>
> I'm working on Oracle 7.3.4 Workgroup Server on Windows NT with SQL*Plus and
> PL/SQL.
>
> Thanks,
>
> Steven Lévesque
> steven.levesque_at_videotron.ca
>

If the actual length of the long is under 32767 bytes you can select it into a varchar2 data type in pl/sql. You can then use the pl/sql instr, substr, etc... functions on the data. Declare your varchar2(32767). (or maybe its 32765 I get confused sometimes. You can not access the contents of a long in pure SQL.

With Oracle 8 you will replace long's with LOB's in your new applications and can use the dmbs_lob package to access parts of a lob. -- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice --

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Apr 30 1999 - 07:53:32 CDT

Original text of this message

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