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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to select data from a LONG datatype

Re: How to select data from a LONG datatype

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Thu, 19 Jul 2001 22:56:50 -0700
Message-ID: <F001.0034F801.20010719223059@fatcity.com>

Ketan Patel wrote:
>
> Hi,
> For long data type in selection use "contains" instead
> of like. Before this set environment for sql*plus like
> " set long 5000 ".
>
> --- Rodd Holman <rodney.holman_at_lodgenet.com> wrote:
> > How do I get past the inconsistent datatypes error
> > on the following?
> >
> > select *
> > from dba_views
> > where owner = 'SA'
> > and text like '%/*%';
> >
> > We have some views that were migrated from 7.3.4 to
> > 8.0.5 and we suspect
> > that we
> > lost our hints in the migration and upgrade. I want
> > to find which views
> > had hints in the old system so that I can bring them
> > forward.
> >
> > Rodd Holman
> > --

... assuming that you have Intermedia, aka Context, running, and that it indexes the Oracle data dictionary. You cannot unfortunately apply anything but a Context query to a LONG, and unfortunately that is what, contrarily to package, procedure and function source, Oracle uses to store views (as well as trigger bodies, default values for columns and, out of memory, CHECK constraints).

This may not me the most elegant way to proceed, but IMHO a good, if brute force, workaround could be something like :

echo "set linesize <something large enough>

      set long <as big as linesize allows>
      select * from dba_views;
      exit" | sqlplus -s system/manager | grep '/*'

I assume of course that like so many people you have religiously kept MANAGER as password for SYSTEM :). And that you are running on a Unix box ..

-- 
Regards,

Stephane Faroult
Oriole Corporation
Voice:  +44  (0) 7050-696-269 
Fax:    +44  (0) 7050-696-449 
Performance Tools & Free Scripts
--------------------------------------------------------------
http://www.oriole.com, designed by Oracle DBAs for Oracle DBAs
--------------------------------------------------------------
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jul 20 2001 - 00:56:50 CDT

Original text of this message

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