Conclusion Oracle SQL Developer spool?

I am using Oracle SQL Developer 2.1.1.64 to generate query results in a text file. This is what I run to call quesry and confuse the results.

SET NEWPAGE 0 SET SPACE 0 SET PAGESIZE 0 SET FEEDBACK OFF SET HEADING OFF set verify off SET ECHO OFF spool c:\client\output_sql\t_1001_02_0522_.txt @c:\client\queries\t_1001_02_query; spool off 

Sorry, I get

@c: \ client \ queries \ t_1001_02_query

at the top of my output text file, and I only need to have results. I searched the Internet for this and tried many things, such as: set confirmation set termout off

+7
source share
5 answers

I found that if I save my request (spool_script_file.sql) and call it using this

@c: \ client \ queries \ spool_script_file.sql as a script (F5)

My conclusion now is only the results with the commands at the top.

I found this solution on oracle forums.

+4
source

You can export the query results to a text file (or insert instructions or even a PDF) by right-clicking on the query result line (any line) and select "Export"

using Sql Developer 3.0

See Downloading SQL Developer for Latest Versions.

0
source

Another way, simpler than me, was working with SQL Developer 4 on Windows 7

 spool "path_to_file\\filename.txt" query to execute spool of 

You must execute it as a script, because if the request is not saved in the output file. In the path name, I use the double "\" character as a delimiter when working with Windows and SQL, the Output file will display the query and the result.

0
source

For buffering in Oracle SQL Developer, here is the solution.

set title to

set lineize to 1500

install colsep '|'

set numformat 99999999999999999999

set page size to 25000

spool E: \ abc.txt

@E: \ abc.sql;

spool off

Hint:

  • when we download from sql plus then all request is required.

  • when we start Oracle Sql Developer, then a query reference path is required as indicated in the above example.

0
source

I tried duplicating the coils you get from sqlplus. I found the following and hope this helps:

Create your sql script file, i.e.:

Pay attention to the echo and serveroutput.

Test_Spool.SQL

 Spool 'c:\temp\Test1.txt'; set echo on; set serveroutput on; declare sqlresult varchar2(60); begin select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') into sqlresult from dual; dbms_output.put_line('The date is ' || sqlresult); end; / Spool off; set serveroutput off; set echo off; 

Run the script from another sheet:

 @TEST_Spool.SQL 

My conclusion from Test1.txt

 set serveroutput on declare sqlresult varchar2(60); begin select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') into sqlresult from dual; dbms_output.put_line('The date is ' || sqlresult); end; 

anonymous block completed

Date 2016-04-07 09:21:32

Coil

-one
source

All Articles