Home » SQL & PL/SQL » SQL & PL/SQL » SQL-SPOOL
SQL-SPOOL [message #224311] Tue, 13 March 2007 18:38 Go to next message
pbills
Messages: 40
Registered: February 2007
Member
Hello,

I have SQL query with some output.Someone here sujjested me to use SPOOL.

But I don't know how to use it.

Can someone help me with this.

Thanks
Pbills
Re: SQL-SPOOL [message #224312 is a reply to message #224311] Tue, 13 March 2007 18:41 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
The documentation is your friend (SPOOL).
Re: SQL-SPOOL [message #224335 is a reply to message #224312] Tue, 13 March 2007 23:15 Go to previous messageGo to next message
pbills
Messages: 40
Registered: February 2007
Member
SELECT to_number((TO_CHAR(ch.check_date, 'YYYYMMDD')))
|| lpad(round(ch.amount),10,0)
||substr('V',1)
|| LPAD ('0', 30, '0')
|| lpad('ZERO',8,0) detail
FROM DUAL
where ch.check_date between
(to_date(:p_start_date,'MM/DD/YYYY')) and
(to_date(:p_end_date,'MM/DD/YYYY'))


I am trying to SPOOL above query and concurrent the program so that user can run when ever they want.
Re: SQL-SPOOL [message #224416 is a reply to message #224335] Wed, 14 March 2007 03:39 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I think we're missing some detail from your query - you're not going to get anywhere looking for the columns CHECK_DATE and AMOUNT from DUAL.

What do you mean when you say 'and concurrent the program so that user can run when ever they want' - I'm afraid I can't understand what you're trying to say.
Previous Topic: using variable in a query
Next Topic: ORACLE PROCEDURE ERROR
Goto Forum:
  


Current Time: Sat Dec 10 12:39:02 CST 2016

Total time taken to generate the page: 0.04385 seconds