Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CAN YOU FTP A TXT FILE FROM SQL PLUS

Status
Not open for further replies.

JONBOY74

Technical User
Sep 11, 2001
36
US
HI ALL

I'VE CREATED A .TXT FILE FROM A SELECT STATEMENT (WITH THE GROUPS HELP) THAT NEED'S TO BE FTP'D. CAN THIS BE DONE FROM A SQL PROMTED, IF SO, CAN SOMEONE POINT ME IN THE RIGHT DIRECTION

MANY THANKS

JON
X-)
 
I don't think so, but you can spool to the dir you want and then ftp it. Try
SQL> spool /u01/temp/xxx.txt
SQL> select ....
SQL> spool off
 
On unix, I suggest you call your sql statement from a script, and then in that same script call ftp with the needed parameters.
Else, from sqlplus you can get to the OS by typing !
si from sqlplus you could do :
! ftp .......

If you're running on windows, better wait for another reply

hope this helps
 
On either OS (or possibly ANY OS, but I can neither confirm nor deny this):

run the query that creates your .txt file.
SQL> HOST ftp .....

 
You can also call native code from pl/sql. But it's not needed here, I think. The easier way would be the script way if you use Unix, or the host command if you use NT.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top