Home » Developer & Programmer » Forms » Call SQLPLUS ok, but then SPOOL problem
Call SQLPLUS ok, but then SPOOL problem [message #80192] Wed, 21 August 2002 08:44 Go to next message
Tyler
Messages: 123
Registered: January 2002
Senior Member
Hey All, thanks for all your responses thus far...

I am able to call SQLPLUS now, while appending the username,pwd,connect and also now I can run the script after opening sqlplus, all implicitly.

My problem now is, I'm trying to spool all of select procedure that is executed when sqlplus is open, to a file. I have tried two things... the spool command in the command line behinde the button that calls sqlplus...

(before)
host('PLUS80W.EXE '||:user_name||'/'||:pwd||'@'||:connect_string||' '||'@PRODUCE_PUBL_EXT.sql');

(after)
host('PLUS80W.EXE '||:user_name||'/'||:pwd||'@'||:connect_string||' spool PRODUCE_PUBL_EXT.txt '||'@PRODUCE_PUBL_EXT.sql');

--this didn't work

and then I tried to put it into the procedure...

set echo off
set heading off
set pagesize 9999
set newpage 0
set linesize 300
spool PRODUCE_PUBL_EXT.txt;
select RPSB_REGION||'|'||RPSB_PRODUCT||'|'||RPSB_FETX_1||', '||RPSB_FETX_3||', '||RPSB_FETX_3||', '||RPSB_FETX_4||', '||RPSB_FETX_5||', '||RPSB_FETX_6||', '||RPSB_FETX_7||', '||RPSB_FETX_8
||'|'||RPSB_DATES||'|'||RPSB_RATES||'|'||RPSB_COMMENTS AS "EXTRACT"
from REPORT_PUBL_SF_BODY
/

but it doesn't seem to be spooling, or even executing the spool command when sqlplus opens... but no error???

Suggestions would be SO appreciated... thanx
~ T ~
Re: Call SQLPLUS ok, but then SPOOL problem [message #80195 is a reply to message #80192] Thu, 22 August 2002 00:10 Go to previous messageGo to next message
nik
Messages: 55
Registered: January 2002
Member
YOU MUST spool off; TYLER TO CR8 SPOOL FILE.

EG.

SPOOL MY_FILE;

SELECT X FROM MARS

SPOOL OFF; --CR8 FILE

NIK.
Re: Call SQLPLUS ok, but then SPOOL problem [message #80856 is a reply to message #80192] Fri, 06 December 2002 19:52 Go to previous message
Jian MX
Messages: 1
Registered: December 2002
Junior Member
set pagesize 9999, it seems that the limitation for
pagesize is 5000
Previous Topic: ora 06401
Next Topic: open report in form error message REP-0503
Goto Forum:
  


Current Time: Mon May 20 03:41:09 CDT 2024