SPOOLing in sql developer does not take into consideration SET ECHO OFF

I'm running SQL Developer 3.1.07.42 on Windows 7 64 bit with java 1.7
I have the following very simple script just to show the problem:
SET ECHO OFF;
SET FEEDBACK OFF;
SET SERVEROUTPUT ON;
SET VERIFY OFF;
SET PAGES 0;
SET HEAD OFF;
SPOOL c:\test.sql
SELECT 1, 2, 3 FROM DUAL;
SPOOL OFF;
/if I run it in TOAD 10.6.0.42 it creates the file with
         1          2          3This is as expected (by me)
if I run the exact same query in SQL Developer 3.1.07.42 , it creates the file with:
< SELECT 1, 2, 3 FROM DUAL
1 2 3(the < above is actually ">" but the CODE formatting software is screwing ">")
but I don't want the ECHOed command to be spooled. For the life of me, I cannot find a way to disable the ECHO from spooling in sql developer.
Tried the same in 3.0.4 and 2.1.1 with the same (bad) result (plus some warning on some of the unsupported SET commands).
Am I missing something obvious? Cause like this, the spool command cannot be used in sql developer to generate a CSV file for example, because of the echoed command. And windows doesn't come with SED by default so that is out. (plus that my original script is integrated into a much larger and complex set of scripts and the main script using them is executed from SQL Developer as a company policy (so that everybody uses the same tool and the code runs the same for everybody))
Any ideas/suggestions are welcome
Thanks.

Hi Gary, you seem to have some extensive knowledge. I'd like to follow-up on this thread and try to understand why SQL Developer won't hide the code even though I'm already running the code as a Worksheet (I assume you mean Run Script F5 button in SQL Developer).
I generally develop in SQL Developer that does a lot of dbms_output to echo data using a Spool command. When I'm in SQL Developer I can't get the code NOT to spool, it typically is echoed directly in the spool file at the top followed by the dbms_output data. If I save the sql file and run in in sqlplus it only outputs the data (good). If I use @C:\xyz_script.sql and hit F5 in SQL Developer it only outputs the data (per your previous answer) -- good.
So why can't I hit F5 in SQL Developer in the script file and have it only output the data? It just doesn't work no matter how many "SETs" you turn-off.
Looks like Echo, Term, Feed are supported in SQL Developer, maybe supported means something other than work.
http://www.oracle.com/technetwork/developer-tools/sql-developer/sql-worksheet-commands-097146.html

Similar Messages

  • Count(*) does not take into consideration the where condition

    the following sql function is supposed to calculate the number of rows that respect the conditions in the where clause. After I call this function I get the the total number of rows in the table. Any help would be much appreciated.
    FUNCTION NBRTRIMCOMPLETES (ETU_NO NUMBER, PRG_NO NUMBER) RETURN VARCHAR2 IS
    nbrTrimCompletes number(6);
    begin
         SELECT COUNT(*) into nbrTrimCompletes from (select * from INSCRIPTION I WHERE I.ETU_NO = ETU_NO AND I.PRG_NO = PRG_NO);
         RETURN nbrTrimCompletes;
    end NBRTRIMCOMPLETES;

    The compile can't distinguish between the column name ETU_NO an the variable ETU_NO, that's why your where condition always evaluates to true.
    Change the name of the parameters.
    FUNCTION NBRTRIMCOMPLETES (P_ETU_NO INSCRIPTION.ETU_NO%TYPE,
                               P_PRG_NO INSCRIPTION.PRG_NO%TYPE
                              ) RETURN NUMBER
    IS
      nbrTrimCompletes PLS_INTEGER;
    begin
      SELECT COUNT(*)
      into   nbrTrimCompletes
      FROM   INSCRIPTION I
      WHERE  I.ETU_NO = P_ETU_NO
      AND    I.PRG_NO = P_PRG_NO;
      RETURN nbrTrimCompletes;
    end NBRTRIMCOMPLETES;

  • Oracle SQL Developer does not browse Sybase's objects

    I had installed and configured jtds-1.2.5.jar in Oracle SQL Developer for Sysbase connection. Oracle SQL Developer does not browse any objects. Why? Can you please provide a solution?

    Hi,
    Can you provide some more information into what you are experiencing.
    What version of SQL Developer are you using?
    Did you install the jtds jar under the
    Tools > Preferences > Database > Third Party JDBC Driver
    Is the Sybase tab available in the new connection dialog?
    Did you select the default database in the connection dialog?
    Can you run a query against the Sybase database from the SQL Developer worksheet?
    Note that JTDS 1.2 is the only supported version. There maybe issues with other versions.
    Regards,
    Dermot.
    SQL Developer Team

  • SQL Developer does not support Oracle 8i

    Hi,
    I was waiting a tool from Oracle like SQL Developer for a long time, finally it came, but I am a little disapointed, so Why SQL Developer does not support Oracle 8i? Other free tools like SQUIRREL can do it. I also have worked in previous projects using PL/SQL Developer and it works fine...Why a native Oracle tool can not do it?
    I am in a project where we have to upgrade the Oracle database to a newer version, but I cannot have access to the old one...
    I know there are some threads in this forum, and some people can work with 8i with no issues. Can anyone who works with SQL Developer and Oracle 8i please tell me how to do it?
    Thanks,
    --Javier
    Edited by: javierlarota on Dec 9, 2009 5:40 AM
    Edited by: javierlarota on Dec 9, 2009 5:41 AM

    That's what I thought, the issue is more commercial ($$$) than technical. Anyway...I downloaded the version 1.1 but now I am getting an ORA-02248: invalid option for ALTER SESSION error. 00604. 00000 "error occurred at recursive SQL level %s".
    Thanks,
    --Javier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • HS.EXP does not take into account the Value member and the source

    Hello,
    The formula is put in the "Entity Curr Adjs" part of the Sub Calculate.
    The expression is the following and apply for one entity (Holding method) I filtered previously and the ICP Entity has proportionnal method with 50% rate:
    HS.Exp "A#5420.I#[ICP None].C1#REC.C2#[None].C3#[None].C4#Recla_IAS_Aut_RetS_5=
    A#5340.V#[Contribution].E#Logista_E_TBCO.I#UTE_O.C1#CLO.C2#TotC2.C3#TotC3.C4#TotC4"
    The data I would like to retrieve is the one in Contribution Value as I put on the source part of the expression.
    And yet, the data I get is the one of the Entity Currency and Proportion Value, which is different because the ICP has proportionnal method (50%) and the Contribution value is the result of Proportion - Elimination values.
    To sum up: I obtain a data of 50 instead of 25.
    I checked that the data I see in my form corresponds to the source parameters but it seems that it does not take into account the Value parameter.
    Could it be that it is not possible to use a Contribution Value source for an Entity Currency Adjs destination?
    Thanks in advance.
    Regards,
    Julien

    Hi,
    I see another problem in what you're trying to do. First, let me state what you're trying to establish: you are trying to get a value from one entity (say A) to another entity (say B), be it at [Proportion], [Elimination], [Contribution], ...
    My question is: how can you know that during the consolidation process, by the time your code runs on B, A has already been processed and [Proportion], [Elimination] are not empty (or contain values from a previous consolidation run)?
    The answer is "You don't". Theoretically, you have no control as per the order in which entities are calculated/consolidated during the process. Even more complex is the thing that if you have a multi-core machine, more than one entities may run in parallel, but still you cannot force A to run before B. I have done some tests and I've seen that in a one processor setting the order that entities enter in the process of consolidation matches the order you have placed them in the consolidation tree in metadata. Still this thing is not documented as far as I know and therefore you cannot rely on this.
    Finally, I have also seen that in a simple case (B pulls from A), if you run consolidation twice, then you definitely get correct values. By the time you make a change in A, you have to run consolidation twice again to make sure that you get the correct data. I believe that you see that what I'm describing is good for experimenting but not for releasing to a client.
    I tend to think of such a design, as a practice to avoid.
    --Kostas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • SQL-tab / refresh button: does not take into account renamed constraint.

    I discovered a small bug:
    1) find or create a table with system generated constraint names (SYS_C007289)
    2) open that table in SQL Developer (I'm using 3.0.04.34). On the constraints tab, there will be the SYS% constraints. On the SQL-tab, the constraints will be shown without a name (simply "not null" for example).
    3) Return to the Constraints tab and use Actions / Constraints / Rename single to rename a constraint.
    4) return to the SQL tab and press the Refresh button. Unexpectedly, the new constraint name is still not in the SQL!
    5) close the entire window/tab for the table
    6) re-open that table.
    7) go to the SQL-tab: now the name of the constraint is in the code.
    As shown above, the workaround is easy, so this is a very minor bug-let.

    Looks like you add an ActionListener to your button <next> every time yuou call buildGui() and, believe it or not, adding a listener more than once triggers additional events. Thus, it's okay on your first loop but on the second it now has 2 listeners and thus will skip 3 and go to four. After this it now has three listeners and will skip 4 and 5 and go to 6 etc, etc.
    // in your buldGui() method
    System.out.println("prints next");
    frameContainer.add(next);
    next.addActionListener(this);
    System.out.println("it has already printed next");
    exit.addActionListener(this);
    frameContainer.add(exit);

  • Installation problem, SQL developer does not start

    Hi,
    I have tried to install both version of SQL Developer, with and without JRE.
    But when I click the sqldeveloper.exe file nothing happens. Nothing at all!
    Do any of you have any tips or ideas what the problem could be?
    I have the latest java jdk installed and jre.
    regards
    Baran

    What output do you get when if you run from the command line?

  • SQL Developer does not recognize my network drive

    I have to cut and paste the full path including the document name in order to pull up a file from my network drive.  Same issue if I try to save a new document to my network drive.
    This is all I see when trying to open a document:
    However, you can see I have lots of drives mapped:

    Found the issue.  Right Clicked on the shortcut I was using to run SQL Developer, chose Properties, clicked on the Compatibility tab, and unchecked 'Run this program as an administrator' under Privilege Level. 

  • SQL Developer does not attach the selected glossary

    I am trying to use a glossary to control abbreviations when generating the Relational Model from the LDM. I go to Tools > Preferences, then select Naming Standards, click on the + to add the glossary, select my glossary, then OK. When I follow that same path there is no sign that the glossary have been attached and certainly no abbreviating taking place when I engineer the Relational Model from the LDM. Can anyone help?

    I have resolved the issue myself. It would appear that you have to attach the glossary BEFORE you create the blank relational model that you wish to forward engineer to. Odd but there you go!

  • SQL file does not open in Mac with SQL Developer

    Hi,
    I have my .sql extension files in mac associated with SQL Developer, but when I open the file SQL Developer does not start; nothing happens.
    I checked all the associations and it seems correct.
    Any suggestion?
    Thanks,
    A.Tarquino
    Edited by: aftarquino on Oct 5, 2010 3:48 PM
    Anyone???

    Hi Mike,
    I can provide solution if you can tell me the registry value(HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open\Command). I believe there is an extra %1 which is causing this.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Let me see if I can get my IT guys to temporarily grant me registry access.  As I said above, it's locked down, but maybe if I ask
    reeeeally nicely :-)  I will keep you posted.  Thanks!
    EDIT: The IT gods have smiled on me.  The value for the key above is "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" /dde
    Not sure if that helps, but there you go.  Thanks! 
    Mike Loux
    Certified Practicing Geek
    mike dot loux at gmail dot com
    Replying to myself in case in-place edits don't trigger a "somebody updated this thread" email.  :-)
    Mike Loux
    Certified Practicing Geek
    mike dot loux at gmail dot com
    Hey Mike,
    Actually edit didnot trigger the email :)
    Change that to
    "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" %1 /dde
    (add %1 and that should fix this forever)
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq

  • Build thumbnail image does not take AnalogBalance into account

    When I build a thumbnail, it does not take AnalogBalance into account.
    dng_image_preview thumbnail;
    dng_render render (host, *negative);
    // Build stage 2 image.
    negative->BuildStage2Image (host, ttShort);
    // Build stage 3 image.
    negative->BuildStage3Image (host, ttShort);
    render.SetFinalSpace (negative->IsMonochrome () ? dng_space_GrayGamma22::Get () : dng_space_sRGB ::Get ());
    render.SetFinalPixelType (ttByte);
    render.SetMaximumSize (256);
    thumbnail.fImage.Reset (render.Render ());
    thumbnail.fImage.Get()->Rotate( dng_orientation::Mirror90CCW() );
    thumbnail.fInfo.fColorSpace = thumbnail.fImage->Planes () == 1 ? previewColorSpace_GrayGamma22 : previewColorSpace_sRGB;

    The AnalogBalance is going to affect the mapping between temp/tint values and camera neutral values. If the white balance values are already stored as camera neutral values, I would not expect it to significantly change thumbnail rendering.
    It sounds like you do not understand AnalogBalance correctly.

  • [svn] 4746: User-submitted patch for SDK-16147 - HaloBorder does not take border widths into account when drawing background with rounded corners .

    Revision: 4746
    Author: [email protected]
    Date: 2009-01-29 15:36:59 -0800 (Thu, 29 Jan 2009)
    Log Message:
    User-submitted patch for SDK-16147 - HaloBorder does not take border widths into account when drawing background with rounded corners.
    Bugs: SDK-16147 (bug), SDK-16963 (patch)
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-16147
    http://bugs.adobe.com/jira/browse/SDK-16147
    http://bugs.adobe.com/jira/browse/SDK-16963
    Modified Paths:
    flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as

  • Why does converting word into PDF does not take the background color of the page?

    When I do a page background on a document, and save as pdf, it does not take the background color. It shows only white background.

    This may be a limitation with the built in PDF writer in OS X. Never tried it so I have no idea if it does the same on my Mac.
    As this is not a MS Word problem you are in the right set of forums.
    Have you tried another PDF writer other then the built in one?

  • Can't Create a Data Source - Failed to test connection. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied

    Hi there,
    I am having a serious issue with The Power BI Data Management Gateway which I am hoping that someone can help me with.
    Basically I am setting a connection between a Power BI demo site and a SQL 2012 Database based on Azure. The Data Management Gateway and is up and running, and Power BI has managed to connect to it successfuly.
    By following the tutorials at
    here I was able to successful create my Data Connection Gateway with a self-signed certificate.
    However, when trying to create the data source I come into problems. The Data Source Manager manages to successfully resolve the hostname, as per the screenshot below:
    Bear in mind that I exposed the require ports in Azure as endpoints and I managed to modify my hosts file on my local machine so I could access the SQL server hosted in Azure using its internal name -- otherwise I would not be able to get this far.
    However the creation of the data source also fails when trying to created it whilst logged in the SQL server in question:
    The Data Source Manager returns the error when using the Microsoft OLE DB Provider for SQL Server:
    Failed to test connection. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
    I tried using the SQL Server Native Client 11.0 instead but I also get an error. This time the error is:
    Failed to test connection. Login timeout expiredA network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.Named Pipes Provider: Could not open a connection to SQL Server [53]. 
    Some considerations
    If I provide an invalid username/password, the Data Source Manager does say that the username and password is incorrect.
    Firewall is turned off in the SQL Server (either way, this error also happens if I try top use the Data Source Manager whilst logged in the SQL Server itself).
    SQL Profiler does not show any attempt of connection.
    The SQL server instance in question is the default one.
    The error happens regardless if I select the option to encrypt connection or not.
    In SQL Configuration manager I can see that all protocols are enabled (TCP/IP, Named Pipes and Shared Memory.
    The Event Viewer does not provide any further errors than the one I have copied in this post.
    I'm at a loss here. Could someone please advise what might I be doing wrong?
    Regards,
    P.

    Here is what I had to do to solve this issue:
    Basically I had to add the MSSQL TCP/IP port as an end-point in Azure. After I did that, then I was able to create the data-source. However, I was only able to authenticate with a SQL account, as any domain account would return me an error saying that the
    domain isn't trusted.
    What puzzles me here is how come the Data Source Manager would inform me that an account username/password was invalid, but it would fail/timeout if I provided valid credentials (!?!?!!?)

  • How do I scan a document into my computer? The instruction book does not go into detail

    HP deskjet 2540 All-in-one
    How do I scan a document into my computer? The instruction book does not go into detail
    Window 7
    Thanks for helping me

    Hi @thea14,
    Welcome to the HP Forums!
    I noticed that you are wondering how to scan with your HP Deskjet 2540 on Windows 7, and I am happy to help!
    Please take a look through this how to scan guide, Scan from Windows 7 With the Full Feature HP Software for HP Multifunction Printers.
    Hope this guide answers your questions, and thank you for posting!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

Maybe you are looking for

  • Line Binding with table Cell issue

    Hello, In my application I need to map data from one table to another table. please see snap from below link http://www.pixhost.org/show/3449/12902612_column-linking.png if you see the snap you will come to know that I have Map Name "Pankti" from Lef

  • Outlook Tasks to iPhone 4S

    I'm running Windows Vista on Parallels on my MacBook Pro and I desperately want to be able to get my tasks from Outlook onto my iPhone 4S in some form.  I've been struggling unsuccessfully so far with TaskTask and with 2Do.  Any ideas?

  • Process order-Variance yield error

    Dear all, Kindly find below first image,in short/exc tab yield variance exist But in second image in short/exc tab yield variance not exist. Regards Rajasekaran

  • QS DP800 shuts down without warning and increasingly fequently

    I have a DP800 Quicksilver which has taken to arbitrarily and without warning just shutting down completely in the middle of a variety of tasks and applications making it hard to attribute the problem to software. It does this with increasing frequen

  • Delivering Plant - Search strategy

    Can anyone advise if this delivering plant search strategy is exclusive i.e. it will stop upon first hit? Customer material info -> Ship to -> Material Thanks Peter