SQL * PLUS - setting wrap on for column [message #309871] |
Sat, 29 March 2008 09:09 |
oraclewannabe
Messages: 26 Registered: January 2008
|
Junior Member |
|
|
hi all, i am playing around with sql plus and i encountered the following problem.
1) is length 10 the default column length for columns with number datatype in sqlplus, i done a select statement and all my column for number have a length of 10
2) why cant i format the length of a number column. i type column empno format 999
although my numbers become #### but "empno" and a length of 10 is still shown at the column name instead of just "emp"
3) how come a column name canot be wrapped
when i set wrap on.
set wrap on
column ename format a3
only the values of ename are wrap
but the column name "ename" isnt wrap
into ena
me
thanks.
|
|
|
|
Re: SQL * PLUS - setting wrap on for column [message #309896 is a reply to message #309884] |
Sat, 29 March 2008 12:56 |
oraclewannabe
Messages: 26 Registered: January 2008
|
Junior Member |
|
|
Michel Cadot wrote on Sat, 29 March 2008 10:51 | 1) yes, dependent on numwidth parameter
2) because number greater than 999 can't be format in "999" model
3) Put exemple of what you meant.
Before please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).
Regards
Michel
|
2) simply put, how do i make EMPNO to be of length 4. If i were to set column EMPNO format 9999 -- i try and its always length of 5.
3)
SET WRAP OFF
COLUMN ENAME FORMAT A2
SELECT ENAME FRO EMP WHERE ENAME = 'SMITH';
EN
--
SM
CLEAR COLUMNS
SET WRAP ON
COLUMN ENAME FORMAT A2
SELECT ENAME FRO EMP WHERE ENAME = 'SMITH';
EN
--
SM
IT
H
Why isnt the column header EN also becomes
EN
AM
E
--
SM
IT
H
Thanks.
|
|
|
|