Re: Question About Viewing Portion of LONG

From: Bimal Dey <euabim_at_eua.ericsson.se>
Date: Fri, 16 Jul 1993 15:06:08 GMT
Message-ID: <1993Jul16.150608.14913_at_eua.ericsson.se>


 In article 14782_at_eua.ericsson.se, euabim_at_eua.ericsson.se (Bimal Dey) writes:
>In article 3By_at_cbfsb.cb.att.com, sbrenner_at_cbnewsb.cb.att.com (scott.d.brenner) writes:
>>I think this has been asked and answered before, but the solution has
>>escaped me. I'm looking for a way to view the first 50 or so characters
>>of a LONG datatype using SQL*Plus. (I know they're not really "characters,"
>>but you know what I mean!) I can't use "substr()" because it's not a
>>character column. Any clues?
>>
>>Please respond directly to me at sbrenner_at_attmail.com; I'll post the
>>answer (assuming I get it) in a few days.
>>
>>a T d H v A a N n K c S e
>>
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>Scott D. Brenner AT&T Consumer Communications Services
>>sbrenner_at_attmail.com Basking Ridge, New Jersey
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
>Include
> Column <Column Name> Format A50
>and
> Set Wrap Off
>in the beginning of your sql-script.
>
>Good Luck.
>/Bimal
>
>
>Enclosing an example below:
>
>SQL> Create Table longtest
> 2 ( col1 Number(10),
> 3 col2 Long);
>
>Table created.
>
>SQL> Insert Into longtest
> 2 Values(10, '12345678901234567890123456789012345678901234567890');
>
>1 row created.
>
>SQL> Select * From longtest;
>
> COL1 COL2
>---------- --------------------------------------------------------------------- 10 12345678901234567890123456789012345678901234567890
>
>SQL> Column col1 Format 99;
>SQL> Column col2 Format A25;
>SQL> Select * From longtest;
>
>COL1 COL2
>---- -------------------------
> 10 1234567890123456789012345
> 6789012345678901234567890
>
>SQL> Set Wrap On;

               ^^^ Off instead of On.

/Bimal   Received on Fri Jul 16 1993 - 17:06:08 CEST

Original text of this message