Home » SQL & PL/SQL » SQL & PL/SQL » how to format output of column (oracle )
- how to format output of column [message #511281] Fri, 10 June 2011 13:25 Go to next message
crocuta
Messages: 8
Registered: November 2010
Location: muenchen
Junior Member
hi,

I have output from select something like :

A_PID B_TEXT id_f
-------------- ----------------------------- -----------
23 B_text sample 9888888

and my question is how can I format the output to have it thinner .
I can do it for text: COLUMN FORMAT B_TEXT A5, but i dont know to apply it for fields with number e.g. A_PID column.


thanks


- Re: how to format output of column [message #511285 is a reply to message #511281] Fri, 10 June 2011 13:34 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
- Re: how to format output of column [message #511286 is a reply to message #511281] Fri, 10 June 2011 13:35 Go to previous messageGo to next message
Michel Cadot
Messages: 68757
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
First for us to be able to know how you want to format your output you should learn how to format your post.

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines do not exceed 80 characters when you format.
Use code tags and align the columns in result.
Use the "Preview Message" button to verify.

SQL*Plus® User's Guide and Reference
Chapter 6 Formatting SQL*Plus Reports

Regards
Michel

[Updated on: Fri, 10 June 2011 13:36]

Report message to a moderator

- Re: how to format output of column [message #511340 is a reply to message #511281] Sat, 11 June 2011 21:55 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9105
Registered: November 2002
Location: California, USA
Senior Member
Formatting Number Columns:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16604/ch_six.htm#sthref550

Number Formats:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16604/ch_twelve013.htm#BABBDHHE

[Updated on: Sat, 11 June 2011 21:57]

Report message to a moderator

- Re: how to format output of column [message #511554 is a reply to message #511340] Mon, 13 June 2011 17:35 Go to previous message
okappaw
Messages: 1
Registered: June 2011
Junior Member

Dear
I have used SQL Plus*. in that i realised that the values that we asign to fields (Last_Name varchar(75)) affect the column's width or size.
I will then advice we do our calculation well before asigning the values.
For my, i used [numwidth, and pagesize] to resolve the problem

eg. numwidth 5;
pagesize 25;

I hope you find this informative and thank u for reading

Apau
Previous Topic: Fill VARRAY using table fields & While loop
Next Topic: Select max(date) from group
Goto Forum:
  


Current Time: Wed May 21 09:33:57 CDT 2025