Re: How do you get a verticle list of table columns plus sample value?

From: John Perkins <jperkins_at_cwcom.zap.net>
Date: Sun, 22 Jul 2001 06:55:30 GMT
Message-ID: <o9o1ktojm9ptvf3ge34u93rqdthssnmil7_at_4ax.com>


[Quoted] On 30 Jun 2001 18:08:13 -0700, Thomas Kyte <tkyte_at_us.oracle.com> wrote:

Many thanks for that Thomas, it had to be around somewhere!

And thanks to Greg re the Excel transpose which I have used for tables with a few columns, however try using that for tables with over 256 columns to get a feel for the data and you'll see the problem!

John



>
>see
>http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1035431863958
>for a copy of print_table I have -- it prints down the screen in sqlplus. Easy
>enough to take it and write a procedure list:
>
>scott_at_ORA8I.WORLD> create or replace procedure list( p_tname in varchar2 )
> 2 as
> 3 begin
> 4 print_table( 'select * from ' || p_tname || ' where rownum=1' );
> 5 end;
> 6 /
>
>Procedure created.
>
>scott_at_ORA8I.WORLD> exec list('emp')
>EMPNO : 7369
>ENAME : SMITH
>JOB : CLERK
>MGR : 7902
>HIREDATE : 17-dec-1980 00:00:00
>SAL : 800
>COMM :
>DEPTNO : 20
>-----------------
>
>PL/SQL procedure successfully completed.
>
>scott_at_ORA8I.WORLD>
Received on Sun Jul 22 2001 - 08:55:30 CEST

Original text of this message