set linesize 32000
set pagesize 32000
set trimspool on
spool c:\dataset.txt
select substr(column1,1,4) as column1,substr(column2,1,20) as column2,substr(column3,1,15) as column3,substr(column4,1,4) as column4 from table1;
spool off
but when i open its all wrapped.when i uncheck wordwrap its okay
but why is there so much gap between column1 and column2 and so on.is there a way so that it will display as given in substr
column1 column1 column1
---------------------------------------- -------------------- ------------
Not after you've wrapped in in SubStr() it isn't, even if it is stored as a number in the database. Run DESCRIBE on the table to see what it really is, and if you want to use a numberic format on that column either embed it in a to_char() or leave it alone and use COLUMN to format it. My preference would be the latter
Bookmarks