-
Hi,
Whenever, I select rows from our tables, the results are very hard to read as they get wrapped over several lines. Is there a way by which we can format all the columns in them to a more treadable format ? like trim the varchars.
I am looking for a script for eg called setTableFormat.sql. Just before I select data from tables, in sql prompt, I can call this script. The script must be a generic one for all tables, I do not want to specify the column names there.
Thanks in advance for all your help
Neelima
-
Check sql reports on how to do it.
SQL> ? set
This would list you the different set options that you could use in the query formatting. Hope this would help you,
Sam
[Edited by sambavan on 03-19-2001 at 03:23 PM]
Thanx
Sam
Life is a journey, not a destination!
-
set heading off
spool tab_rowcount.sql
select 'select '''||table_name||'---''||count(*) from '||table_name from user_tables;
spool off;
spool tab_row_info.txt
@tab_rowcount.sql
spool off;
This will give you the tables row count from user_tables. Other way is analyze the tables and it will give you the tables row count.
sree
-
Hi,
column c1 format t1 - is a formatting command.
where c1 is a column name and
t1 is datatype and width eg(a16)--char with 16 bytes in length.
Thanks.
M.S.Nazar
-
you can inclue set linesize command.
SQL> set linesize 1000
then run you select command.
thnx
P. Soni
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|