• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • 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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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