Re: A newbie need help!! Any saviors?

From: Vernon Lazaro <vlazaro_at_pipeline.com>
Date: 29 Nov 1994 20:09:12 -0500
Message-ID: <3bgjbo$5sc_at_pipe1.pipeline.com>


  1. to redirect output to a file you need to issue a spool command, example :
     spool <filename>
     <run sql statement here>
     spool off

by default, the file will have an extension of .lst. You may want to "set term off" so as not to see the output in the screen during spooling.

2. To use the host command, you need to construct the command string, example :

     my_string := 'host runrep...'||:date1||'...'||:date2;
     host(my_string);

Hope this helps.  

x93aroor_at_wmich.edu () wrote:

>
>Hello Gurus,
> A couple of questions from a newbie:
>
>Note: This is Oracle dbms and tools for dos
>
>1) When in sql*plus can I redirect a select statement
>so that it prints the output or writes it to a
>file?(instead of printing the result of the query onto
>the screen)
>
>2) I am using the report-writer to generate some
>reports. I need to let the user fill in the dates that
>the query would use. eg. The no of hours put on a
>certain job from date1 to date2.
>
>My understanding is :
>If I do not want to use the paramform feature of the
>reportwriter, I can pass it on as a parameter from a
>sql*form. Is there any other "neat" way?
>
>I have created a non-base table form that enquires the
>start_date and end_date from the user and then
>executes a trigger as under:-
>
>host( 'runrep report=timerep userid=james/mypass
>batch=yes begin_date =:start_date end_date=:end_date
>', no_screen);
>
>begin_date and end_date are variables in the query of
>the report writer.
>
>start_date and end_date are fields in my form that the
>user fills in.
>
>I have tried playing around with placement of the
>single quotes yet cannot get it to work. Can someone
>PLEASE help!!
>
>some of the problems:
>1) If I actually hardcode the date it works, but when I
>return to my form, I get an error that reads something
>like "no cursor to form", or I get a stack dump and
>the program crashes.
>
>How can I pass on the user id and password without
>explicitly stating as above? Is it available as a
>variable?
>
>Thanks in advance to all of you!!!
>-Chandru
>
  Received on Wed Nov 30 1994 - 02:09:12 CET

Original text of this message