Ravi,
You should not have to format or align the output data from the spool
command. Do your formatting with your select statement (see example
below). BTW, the chr(39) is a single quotation mark.
set echo off
set heading off
set verify off
set feedback off
set newpage 0
set pages 0
set lines 0
set linesize 132
set flush off
set termout off
spool emp.txt
SELECT EMPNO || ',' || chr(39) || ENAME || chr(39) || ','
|| chr(39) || JOB || chr(39) || ','
|| MGR || ',' || chr(39) || HIREDATE || chr(39) || ',' || SAL || ','
|| COMM || ',' || DEPTNO
FROM (SELECT rownum row_num, A.*
FROM (SELECT *
FROM emp
) A
) B
WHERE B.row_num between 2 and 4
/
spool off
/
Happy New Year! Red Stripe! Partyyyyyy! Hehe.
Please take a few minutes to provide feedback on the quality of service you received from our staff. The Department of Education values your feedback as a customer. Commissioner of Education Dr. Eric J. Smith is committed to continuously assessing and improving the level and quality of services provided to you.Simply use the link below. Thank you in advance for completing the survey.
http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]
-----Original Message-----
From: ravi.v
[mailto:oracledba-ezmlmshield-x64827081.[Email address protected]
Sent: Monday, January 07, 2008 6:43 AM
To: LazyDBA Discussion
Subject: RE: Pushing Data into excel sheet !!!!
Could you please send it to me? I have tried Ed's Procedure and it works
but
takes time in formatting and alignment.
Kind Regards,
Ravi.
-----Original Message-----
From: Luis Cardenas
[mailto:oracledba-ezmlmshield-x31192731.[Email address protected]
Sent: Monday, January 07, 2008 5:05 PM
To: LazyDBA Discussion
Subject: RE: Pushing Data into excel sheet !!!!
You could also use HTML Marking, it works a treat, Ed sent a procedure
some while ago if you want it let me know, this is of course if you have
not found a sol that satisfies your problem yet.
Regards,
Luis
-----Original Message-----
From: kazi
[mailto:oracledba-ezmlmshield-x84875907.[Email address protected]
Sent: 07 January 2008 06:47
To: LazyDBA Discussion
Subject: Re: Pushing Data into excel sheet !!!!
You can use OLE2 (from Oracle forms for instance) for all the job.
There is also a very nice tool SQL*XL which simplify access from excel
to oracle very much.
If not using it, you can pool data from oracle via ODBC.
And finally You can use latest MS office: There is row limit moved from
64k rows to 2G rows!!!
KAzi
ravi.v wrote:
> Hi Experts,
>
>
>
> Can somebody help me in pushing the output of a SELECT statement into
excel
> sheet.
>
> Also if the table is too huge (2 million rows) how to select the data
from
> the table in splits for example: first 50,000 rows and next 50,000
rows and
> so on.
>
>
>
> Help in this regard would be highly appreciated.
>
>
>
> Kind Regards,
>
> Ravi.
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> To post a dba job: http://jobs.lazydba.com
> To Subscribe : http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>
>
>
>
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
-----------------------------------------
This e-mail is sent on behalf of Trader Media Group Limited,
registered office: Unit 6, Thatcham Business Village, Colthrop
Lane, Thatcham, Berkshire RG19 4LW (Registered in England No.
4768840). This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email
in error please notify the sender. This email message has been
swept for the presence of computer viruses. www.ciphertrust.com
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page