report generation [message #414745] |
Thu, 23 July 2009 06:36 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
pointers
Messages: 451 Registered: May 2008
|
Senior Member |
|
|
Hi,
I have been trying to get report generated from sql*plus in a well formatted way.
I have used,
set echo off
spool c:\temp.xls
select * from temp where rownum<6;
spool off;
But the above is not giving me the well formated output into excel sheet.
I am unable to attach the excel file here that i pulled as the excel format is not supported here to upload.
So, i will say, my table has some 20 column if i go by spooing via sql * plus its not giving well formated output. How to format that.
Any specific commands please.
I want to do the same via sql * plus
please help me how to get that done.
Regards,
Pointers
|
|
|
|
Re: report generation [message #414753 is a reply to message #414748] |
Thu, 23 July 2009 06:52 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
pointers
Messages: 451 Registered: May 2008
|
Senior Member |
|
|
Yes..i.e. i would like the output like,
1. all columns in a sinle row (i have 20 columns)
2. data according to the column headings i.e. cells in excel sheet
I would say a simple readable report.
i am getting column headings in multilple rows when i go by sql * plus
Regards,
Pointers.
|
|
|
|
Re: report generation [message #414755 is a reply to message #414753] |
Thu, 23 July 2009 07:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
In that regard, excel works better when opening HTML files than CSV or text files.
Try an additonal
before the spool
|
|
|
Re: report generation [message #414761 is a reply to message #414753] |
Thu, 23 July 2009 07:29 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
pointers wrote on Thu, 23 July 2009 13:52 |
i am getting column headings in multilple rows when i go by sql * plus
|
Set pagesize to a required value.
Considering the fact that you have been working with Oracle for at least a year now, one might expect you to know this, or to know where to find this.
|
|
|
Re: report generation [message #414811 is a reply to message #414745] |
Thu, 23 July 2009 10:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
pointers
Messages: 451 Registered: May 2008
|
Senior Member |
|
|
Thomas thanks for the information. That worked me.
Do we have any direct way of creating excel file(formated like using delimiter) for the same thing.
Regards,
Pointers
|
|
|