Home » Other » Client Tools » Output File (Oracle 10g, Windows NT)
icon9.gif  Output File [message #311339] Fri, 04 April 2008 02:26 Go to next message
KAWAII
Messages: 4
Registered: April 2008
Location: PHILIPPINES
Junior Member

hi,

is anyone know if oracle is capable of saving a .txt file to the desktop?

if yes, can anyone show me how to save a .txt file to the desktop?

thanks in advance.

god bless
Re: Output File [message #311342 is a reply to message #311339] Fri, 04 April 2008 02:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From what?

Regards
Michel
Re: Output File [message #311344 is a reply to message #311342] Fri, 04 April 2008 02:49 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
What do you call "the" desktop. Client side? Oracle is installed on the SERVER. You need some client side programming to get it on the client's side.

What client tool?

MHE
Re: Output File [message #311345 is a reply to message #311344] Fri, 04 April 2008 02:58 Go to previous messageGo to next message
KAWAII
Messages: 4
Registered: April 2008
Location: PHILIPPINES
Junior Member

i mean, is oracle capable of saving a .txt file outside of its folder..

for example, a filename "sample.txt" will be saved in "C:\TXTCONNECT" using oracle scripts..

is it capable???

thanks for the responds...
Re: Output File [message #311352 is a reply to message #311345] Fri, 04 April 2008 04:15 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Still the same question, from what?
It is sure not able to save from MS/Word.

Regards
Michel
Re: Output File [message #311364 is a reply to message #311345] Fri, 04 April 2008 04:48 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, here's how it is: if you have installed Oracle 10g on your PC, then specify any existing destination to save your file. As you want to put it onto the desktop (which is just another directory), fine. The result is on an image (SQL*Plus session, desktop icon and file opened in Notepad):

/forum/fa/4101/0/

But once again: Oracle is installed on my computer (so it is a server), and I was able to do that.

If you connect to an Oracle database remotely (via LAN, for example), file will be created on a server, NOT your computer. Actually, it will be created there if required (write) privileges are met.
  • Attachment: desktop.PNG
    (Size: 18.28KB, Downloaded 1694 times)
Re: Output File [message #311577 is a reply to message #311364] Fri, 04 April 2008 19:22 Go to previous messageGo to next message
KAWAII
Messages: 4
Registered: April 2008
Location: PHILIPPINES
Junior Member

Thanks for the reply...

If I used PL/SQL Developer, is the code that you give me the same?

i tried this code,

spool "C:\Documents and Settings\HLIMPIO\Desktop\sample.txt"
SELECT wo_number, date_applied FROM cwos.work_orders
spool OFF;

but i doesn't work.

sorry if i have to many questions,

i am just doing this to gain more information about oracle
and to learn from it.

i have tried to search it in the web but I didn't find any solution.

hope that you can help me..

thanks to the people who viewed and reply to my questions.

god bless..
Re: Output File [message #311630 is a reply to message #311577] Sat, 05 April 2008 03:56 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
If I used PL/SQL Developer, is the code that you give me the same?

I don't use PL/SQL Developer; you should have mentioned it in the first place so that we'd know what to deal with.

However, if this tool is anything like TOAD (which I use), then the answer is "no"; SPOOL is SQL*Plus command and - sincerely - I doubt that it works anywhere out of it. TOAD allows you to save output whenever you want (to a text file in any directory of your choice, MS Excel worksheet, CSV file, etc.). I *believe* PL/SQL Developer offers the same functionality. How to use it? No idea; did you try right-click in the output query section? Or, even better, check Help and see what it says about it.
Re: Output File [message #311793 is a reply to message #311630] Sun, 06 April 2008 21:17 Go to previous messageGo to next message
gouthami1970
Messages: 2
Registered: April 2008
Location: Atlanta
Junior Member
hi,

u can use utl_file for creating a text file or csv file in O/Slevel i.e storing outside database.u can also use SQL Loader for creating a text file.

Gouthami
Re: Output File [message #311824 is a reply to message #311793] Mon, 07 April 2008 00:40 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Except that utl_file writes to the server, and spool writes to the client.
Please share with the community how to use SQL Loader to create a text file!
Re: Output File [message #311947 is a reply to message #311339] Mon, 07 April 2008 08:33 Go to previous messageGo to next message
scorpio_biker
Messages: 154
Registered: November 2005
Location: Kent, England
Senior Member
Hi,

If you want to use PL/SQL Developer to spool out a text file you can to run those commands in a Command Window. That mimics SQL*PLUS. Open a new Command Window and click on the Editor tab. Enter your commands and then execute.

I'm not sure how to do that directly from a SQL window as I normally do my extracts straight to Excel.



Re: Output File [message #315078 is a reply to message #311947] Fri, 18 April 2008 21:13 Go to previous messageGo to next message
KAWAII
Messages: 4
Registered: April 2008
Location: PHILIPPINES
Junior Member

Hi,

Thanks for all your reply.

I will just try and execute all your suggestions and comments.

Thanks anyway and Gob bless.
Re: Output File [message #315192 is a reply to message #311339] Sat, 19 April 2008 16:57 Go to previous message
learnSQL
Messages: 19
Registered: April 2008
Location: Texas
Junior Member
Try this it may help:
SQL>echo on
SQL>spool c:/mysql.text --any folder you want
SQL>@ c:/mysql.sql -- run your script file
SQL>spool off -- Must spool off to see your file

Good luck!
Previous Topic: Command line parameters for sql script ?
Next Topic: Error N' is not a valid integer value 11g with toad 8.5.3
Goto Forum:
  


Current Time: Fri Mar 29 10:29:00 CDT 2024