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: formatting output with SQL*Plus

Re: formatting output with SQL*Plus

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Fri, 10 Dec 2004 17:55:02 -0800
Message-ID: <1102729994.504868@yasure>


Thomas Kellerer wrote:
> DA Morgan wrote on 09.12.2004 23:22:
>

>> you could try CASTing as a CLOB or alternatively CASTing as smaller 
>> VARCHARs. For example:

>
> That gives me an "ORA-00932: inconsistent datatypes"
>
> Casting to a smaller varchar doesn't help, as it truncates the entries...
>
>> But I'd be fascinated to know why every column is defined as a 
>> VARCHAR2(2000) and see if you can bring some sanity to the design
>> (assuming there isn't some valid reason for the size).

>
>
> Don't ask :) It's used to store large portion of textual information in
> different languages. Some of them are actually HTML fragments (that's
> why they are that big). I can image a several better ways of storing
> (and moving around) this kind of information, but we have inherited this
> system and are not able to change it.
> My (wild) guess is, that the original creators would have taken LONGs
> for every column if Oracle had only let them :)
>
> Thanks for your help.
>
> Cheers
> Thomas

Then the best you can do is trim to your shortest entry using that technique. Probably not what you're looking for.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Fri Dec 10 2004 - 19:55:02 CST

Original text of this message

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