Home » SQL & PL/SQL » Client Tools » Format columns (PL/SQL)
Format columns [message #376379] Wed, 17 December 2008 03:14 Go to next message
abcxyz
Messages: 2
Registered: December 2008
Junior Member
Hi,
Am using pl/sql spool to export data from oracle table to textfile. but the data in the textfile appers like this.
this consists of 1 row only. i need to limit each column width. Anyone please help..


A_CODE B_CODE P_KEY TRADE_NAME UNIT_OF_MEASURE SUPPLIER_NAME
---------------------------------------- ---------------------------------------- ---------- -------------------------------------------------------------------------------------------------------------- -------------------- ------------------------------------------------------------
ABC 599900000 46 REPAIR CHARGES FOR SPC-8000 ###adc



Thanks in advance.
Re: Format columns [message #376382 is a reply to message #376379] Wed, 17 December 2008 03:16 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
it seems data has been delimited by space. there should not be any problem
Re: Format columns [message #376383 is a reply to message #376379] Wed, 17 December 2008 03:20 Go to previous messageGo to next message
trivendra
Messages: 208
Registered: October 2007
Location: Noida, India
Senior Member
Use

COLUMN A_CODE FORMAT A10


to set the column width

Thanks
Trivendra
Re: Format columns [message #376384 is a reply to message #376382] Wed, 17 December 2008 03:22 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
You can play around with SET and COLUMN commands. Some examples:

SQL> set linesize 132
SQL> set trimspool on
SQL> col A_CODE format A3
Etc.
Re: Format columns [message #376386 is a reply to message #376383] Wed, 17 December 2008 03:23 Go to previous message
abcxyz
Messages: 2
Registered: December 2008
Junior Member
Thanks for the reply.

where i should use this.
am running this spool using script file.
Previous Topic: Toggle Compiling with Debug
Next Topic: is there any shortcut to open the SQL* PLUS editor using Toad??
Goto Forum:
  


Current Time: Fri Dec 09 15:52:02 CST 2016

Total time taken to generate the page: 0.29150 seconds