• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 397
  • Last Modified:

oracle

I am using DOS command prompt. Is there any way to make output format look better?

SQL> SELECT VERSIONS_XID, VERSIONS_OPERATION, C1
  2   FROM CH57  VERSIONS BETWEEN TIMESTAMP TO_TIMESTAMP(' 25-OCT-2011 15:47:51.
025')
  3
AND TO_TIMESTAMP('25-OCT-2011 15:51:17.744');

VERSIONS_XID     V         C1
---------------- - ----------
06000500B8010000 I         20
06000500B8010000 I         10

SQL> SELECT VERSIONS_XID, VERSIONS_OPERATION, C1
  2   FROM CH57  VERSIONS BETWEEN TIMESTAMP minvalue and maxvalue
  3  ;

VERSIONS_XID     V         C1
---------------- - ----------
09002C00CD010000 U        100
06000500B8010000 I         20
06000500B8010000 I         10

SQL> SELECT VERSIONS_XID, VERSIONS_STARTTIME,VERSIONS_ENDTIME, C1
  2   FROM CH57  VERSIONS BETWEEN scn minvalue and maxvalue
  3  ;

VERSIONS_XID
----------------
VERSIONS_STARTTIME
---------------------------------------------------------------------------
VERSIONS_ENDTIME
---------------------------------------------------------------------------
        C1
----------
09002C00CD010000
25-OCT-2011 15:51:45.000

       100


VERSIONS_XID
----------------
VERSIONS_STARTTIME
---------------------------------------------------------------------------
VERSIONS_ENDTIME
---------------------------------------------------------------------------
        C1
----------
06000500B8010000
25-OCT-2011 15:48:24.000

        20


VERSIONS_XID
----------------
VERSIONS_STARTTIME
---------------------------------------------------------------------------
VERSIONS_ENDTIME
---------------------------------------------------------------------------
        C1
----------
06000500B8010000
25-OCT-2011 15:48:24.000
25-OCT-2011 15:51:45.000
        10
0
lojayn
Asked:
lojayn
1 Solution
 
slightwv (䄆 Netminder) Commented:
How do you want it to look like?

You are limited to the command prompt based on width but you can produce some nice reports using sqlplus.

For example:
Set linesize 100
Set pages 26
Column versions_starttime form a26
Column versions_endtime form a26
...

For longer lines Spool out the file then open in notepad:

Spool junk.txt
Select ....
Select ....

Spool off
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now