Sql developer: question about exporting data

Hi,
we're recently working with sql-developer. i've got a question about how we can export query results to txt/csv files for use in other applications.
First a problem: if we start a query that looks like this:
select * from
select * from A where start_date = &date
) a,
select * from B where start_date = &date
) b
where a.name = b.name
Sql-developer asks twice to input a value for the variable 'date', although it's the same variable and it's supposed to have the same value.
We solve this by making a script:
first we define the variable, then we put the query.
When we start the script, the query runs ok and sql developer asks to input the value for the variable once.
But now the result of the query is shown in the script output. The script output seems to be limited in number of lines and difficult to export.
So my question is: what's the best way to export query results to txt/csv files, avoiding the problem mentioned above?
i hope there is a solution where we can use a single query or script.
Thanks in advance!

Using bind variables like ":date" should solve the problem of being asked twice for the same thing.
Executing the query normally (F9), gives you the export options you require through the context menu inside the Results grid.
Regards,
K.

Similar Messages

  • SQL Developer 3.2 - Exporting data with TIMESTAMP datatype

    Hi,
    We have users that are attempting to export data with the Timestamp format to Excel (xls format) using SQL Developer 3.2.  When attempting to sort the Timestamp in either asc or desc order, Excel is having issues sorting correctly.  I suggested that the user just do all the sorting within their SQL Developer session but they require the ability to slice and dice in Excel.
    This is definitely not an issue with Excel as the users have previously exported Timestamp data from Toad and been able to sort without issue.  Any thoughts as to what might resolve this issue? 
    Thanks.

    We're not formatting timestamps in Oracle as numbers/dates in Excel. They'll need to properly format the Excel column/cells to get it to sort the way they want vs being treated as simple strings.

  • SQL Developer 1.5 - Exporting Data

    Hi,
    I am using SQL Developer 1.5 and trying to run query and asving the data to to file but having following problems.
    1) How to save data as pipe or other delimitted data in text file?
    2) when i am saving as text file, its taking longer but when its done, it shows 0 kb.
    Appreciated your help!
    Thanks,
    poratips

    This issue has been fix in version 2.1 that is YET TO BE RELEASED. There are no known work arounds for this issue in 1.5.

  • SQL Developer is not exporting the time part of date data types.

    I need to export data from a table using sql developer. The column is a date data type but when I export the data to a csv, xls or an sql file with insert statements, sql developer only includes the date part without the time.
    Please kindly advise.
    Thanks,
    Erika

    What is your 4 digits Oracle version ?
    What is your SQL Developer version ?
    With Oracle XE and a schema named TEST I have:
    select * from t
    X                        
    04-FÉVR.-2010 21:24:40  If I use Tools/Database Export with all default settings with SQL Developer 2.1.0.63 I get following SQL file:
    --  Fichier créé - jeudi-février-04-2010  
    --  DDL for Table T
      CREATE TABLE "T"
       (     "X" DATE
    --   DATA FOR TABLE T
    --   FILTER = none used
    REM INSERTING into T
    Insert into T (X) values (to_timestamp('04/02/10 21:24:40,000000000','DD/MM/RR HH24:MI:SS,FF'));
    --   END DATA FOR TABLE T
    ---------------------------------------------------Edited by: P. Forstmann on 4 févr. 2010 21:26

  • Question about tranferring data from iPhone 3gs to iPhone 4

    I just had a couple quick questions about transferring data from my old phone from my new iPhone 4. The reason i am wondering is because i am worried about whether i will encounter any problems when doing so.
    First off i have already sold my phone today, i reset all data and settings from the phone and gave it to my buddy so its gone. I did a full sync and backup yesterday so all the necessary files should be on my computer(windows 7). Now, im basically wondering if i will run into any problems if i restore my iphone 4 from a backup. My 3gs was running 3.1.2 on att. Now i know IDEALLY i would have updated it to iOS 4 before backing it up and used the newest version of itunes, but i did not. Does anyone think this will be a problem for me?
    Now with that out of the way, my biggest fear is losing my old data(text messages and notes mainly because i am a pack rat for those type of things) so id like to be SURE that none of my old backups will be deleted in any scenario. The reason i dont just restore it right now is because i want my new phone to be as clutter free as possible. I am going to be putting on here only the apps that i used often and would basically like to transfer over the BARE minimum; texts, notes, and highly used apps... So i guess my main question is can you transfer over only certain things like texts and notes after setting up the phone as a new phone. And if i were to set up the phone as a new phone what would happen to my old backups? Would i be able to selectively restore?
    Im afraid that it might not be a possibility to transfer only certain things even though it should be.. i should be able to select a text messages folder and put it on my new phone and be done with it... But anyway i dont want to rant. Can anyone explain to me how this all will work?
    ULTIMATE GOAL: Transfer only texts, notes, certain apps(and their data) and NOTHING ELSE.
    MOST IMPORTANT THING: Not losing texts and notes. I can deal with putting all the old **** on my new phone and cluttering/slowing it down if i NEED to.
    Thank you in advance, sorry for the long post.

    If the most important thing for you is keeping old text messages, notes, and voicemail, then you'll need to sync the phone from your existing backup. I know of no other way to access those items.
    Once you have synced to the new phone, check that you have those items that were important. Then you can reconnect your phone to iTunes, and change the sync settings to remove the apps or other items you no longer want to keep on the phone.
    iPhone backups are stored by iTunes; you can see them by opening your iTunes preferences, clicking on "Devices" and then looking in the window. You can delete old backups from here. I don't know how you can open/read the backups though.
    I don't expect you'd have any problems syncing from your old phone's backup, but it's definitely an either/or situation. Since you got rid of the old phone already, it's too late to email yourself your notes, or copy the text messages. Your previous backup is your only solution.

  • Question about displaying data

    Based on the search criteria I need to show some info. with check box on each item, but it might retrun upto fifty items (between 1 to 50 items). Should I create checkbox/output text dynamically or how do I handle this scenario? In the jspx how do I loop it and display? Thank you.

    hi user13094256
    See my reply in your other forum thread with the same question
    at Question about displaying data
    regards
    Jan Vervecken

  • Question about exporting FBL3N data in Pivot table format

    Dear all
    I have a question about the "exporting file" function of ECC 6.0.
    We started to use ECC 6.0 system, and it appears that we are no longer able to export "FBL3N data" to a local PC in pivot table format.
    Is there a way to do it?
    We used to be able to do so when the system is 4.6.
    I appreciate your support!
    Kind regards

    Dear:
                 You can do that. Execute report FBL3N with desired GL account in it. After when report has been executed right click on it. There will be an option Spread Sheet. Select all available format. In drill down select 08 (Excel in existing XXL format) and press OK. There you will get pivot table option for downloading., Hope this will help you resolve your query.
    Regards

  • SQL Developer - problems with the Data Modeller part

    Hi SQL Developer users,
    I can open the Data Modeler pane, but I can't insert any object into the logical model or into the relational model. Any ideas about what I'm doing wrong? Do I need specific privileges to the database, or do I need to install SQL Developer in a different way?
    Thanks,
    Csisz

    Hi Csisz,
    as Ivaylo wrote - it's Data Modeler Viewer into SQL Developer.
    I can't insert any object into the logical model or into the relational modelYou can drag tables from SQL Developer browser and drop them on relational model diagram. If you keep Ctrl key pressed then all child tables also will be imported and shown on diagram.
    Philip

  • SQL Developer Hangs on Export

    SQL Developer version 1.0.0.14.67
    The application immediately freezes (so quickly, in fact, that it doesn’t even remove the context menu from which I have selected “Text” or “CSV”). I can still utilize the general windows controls (minimize/maximize, restore, etc). If I minimize and then restore the application it doesn’t redraw anything bit the title bar. The entire application window is system gray.
    The data set I retrieved included 2,208 records with 14 elements each.
    I tested it again with a slightly smaller data set (1,982 records) and this time I selected “Text” as the export format. Same result.
    The application still shows as “Running” in Task Manager, but the process “sqldeveloperW.exe” shows “00” under CPU activity and never moves. I am experiencing nominal Memory and CPU utilization (other programs are still open). Nothing is pegged @ 100%.
    I’ve let the application sit in this state for 10+ minutes with no change.

    There have been several updates since 1.0.0.14.67. Could you upgrade to the latest version?

  • Sql Developer MSSql Migration, Online data move, image to long raw mapping

    Hello,
    my task is to migrate a MSSql Server Database to Oracle 10.2.0.4 with SQL Developer Version 2.1.1.64
    and JTDS JDBC Driver oracle.sqldeveloper.thirdparty.drivers.sqlserver 11.1.1.58.17.
    Capture, convert and online data move works except data mapping from MSSql image to Oracle long raw dataype.
    I need to map MsSql image to oracle blob, to achieve online data move!
    is Sql Developer online migration MsSql image to oracle long raw possible?
    I know that long raw is outdated, but i'm dba and not responsible for the software part.
    What options should i try? offline data move? can MS Bulk Copy Program export image data and SQL*Loader import into long raw?
    Any experience or tipp?
    Thanks
    Michael

    Hi user12132314 ,
    I do not see any 'long raw' options on our current SQLServer 2005 data type mapping. (Raw is a separate 2000 byte data type).
    The usual route for SQLDeveloper is to go to Blob.
    Online - this is simple & automated.
    Offline - this actually goes via hex output in bcp to sqlldr, read in as CLOB which is then encoded to blob. (This is automated)
    (Online 'Copy to Oracle' option, right click on table, may be of use if advanced features not included in the select such as defaults are not required, it copies over a select * from table, including blobs)
    To move you from blob to long raw after migration can be done (easily enough if Oracle database >=10g so the stream does not have to be in smaller 'chunks')
    http://asktom.oracle.com/pls/asktom/f?p=100:11:3938270166267830::::P11_QUESTION_ID:702825000306
    I can look into this if you want to go down this route.
    Note however that long raw has drawbacks and blob is preferred, see
    Oracle® Database SQL Language Reference
    11g Release 2 (11.2)
    Part Number E17118-04
    Data Types
    LONG Data Type
    for example one restriction is:
    A table can contain only one LONG column.
    -Turloch
    SQLDeveloper Team

  • SQL Developer not migrating Sybase data

    Hi,
    I am trying to migrate data using the SQL developer tool from a Sybase database to Oracle 11g. When using the Migration Repository, I am able to recreate the schema but am not able to export the database content. (i.e. Not able to do the Data Move). I tried doing a Offline migration but the generated datamove files does not have any content. Anyone aware of any issue with the data migration tool with SQL developer ?
    I have tied exporting data from the table directly to generate SQL inserts but even this is not helping. Any suggestions ?
    Regards,
    Nelson

    Hi Nelson,
        Could you detail the exact steps you followed and what options you chose at each of the panels in the migration steps ? this will help to see where you may be having problems.
    Regards,
    Mike

  • Sql Developer 3.1 - Exporting a result set in xls generates and empty file

    Ever since upgrading to the Production version SQL Developer 3.1 (3.1.07) it appears that there is an issue when attempting to export a result set as a .xls format.
    If I attempt to export in .xls format, the exported file is an empty file (i,e no output). When I change the export type to txt, csv or xlsx the results are exported as expected.
    This appears to be a bug introduced in the Production version as I was successfully able to perform these tasks on the various 3.1 EA releases.
    Am I alone in this, have I misconfigured something or is this a bug?

    I keep having problems exporting to XLSX - mostly in cases where the data is voluminous and the format would be preferable over plain XLS as it does not have the 65krows limit ;-{ The data is read to the data grid (sometimes fast, sometimes much slower and "in chunks"), then the "task progress" won't move anymore, and the export file remains empty; If I cancel the task, trying to export again results in a message stating that sqldeveloper still has the output file locked.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • SQL Developer question

    Hi Folks
    I am using SQL Developer tool. I have a procedure with compilation errors so i can see that procedure with red X mark in SQL Developer tool.
    When am clicking on the procedure it is going to the editor there i can see "code"."grants","dependencies","references","details","profiles" tabs
    But i can't able to see "Errors" tab in the editor. And main thing is i didnt see any red lines in the editor for the invalid procedure
    And when i recompiled that procedure it got recompiled successfully and that red x mark is vanished.
    Here my question is the "Errors" tab is only appears when the procedure/function/package has errors and surprisingly i didnt see any red lines in the editor for invalid procedure (may be my proc has no errors).
    ps: i have asked this question in sql developer forum but i posted here as you may work on this
    Thanks

    Dear Sir
    I have this procedure Find_Emp
    create or replace
    procedure find_emp(p_in_empno in number)
    as
    v_ename emp.ename%type;
    begin
    select ename into v_ename from emp where empno=p_in_empno;
    dbms_output.put_line(v_ename);
    end;and i have done
    alter table emp add dname varchar2(10)I dont know why Find_Emp is invalid now,Folks can you please help.
    But that change doesnt affecting the below procs also, i mean these procs are not showing as invalid
    create or replace
    procedure test
    is
    cursor c is select ename,empno from emp;
    v_result c%rowtype;
    begin
    open c;
    loop
    fetch c into v_result;
    exit when c%notfound;
    dbms_output.put_line(v_result.ename||' '||v_result.empno);
    end loop;
    close c;
    end;
    and
    create or replace
    procedure p1
    AUTHID CURRENT_USER
    as
    v_cyc_dt varchar2(10);
    begin
    v_cyc_dt := '20120101';
    execute immediate 'create table t1 as
    select * from emp
    where hiredate >=to_date(''||v_cyc_dt||'',''yyyymmdd'')
    and rownum <= 1000';
    end p1;

  • SQL Developer 4.0 EA3: Data Miner Repository Migration Issue

    If you are attempting to migrate a existing Data Miner repository using SQL Developer 4.0 EA3, please review the following Data Miner forum posting.
    Thanks, Mark
    Data Miner Extension in SQL Developer 4.0 EA3 Release: EA3 Repository Migration Failure

    Hi Gustavo,
    It appears your Service SFTP user was not created correctly. Please contact support and mention the fact that your Service SFTP user appears on Security/Users tab and not on Security/SFTP Users tab.
    Vlad

  • How to get the exact sql developer which used for data migration?

    Hi all,
    Hope doing well,
    Sir i seen a link for data migration that is : http://www.oracle.com/technetwork/developer-tools/sql-developer/sql-server-connection-viewlet-swf-089886.html
    in this link when they are connecting to sql database so after clicking on new connection four tab is showing that is oracle, access, my sql, sql server.
    i downloaded latest version of sql developer which version is: 3.02.09.30 when i opened this i am not getting those option.
    and one more thing i am not getting miragation menu name in menu items.
    please help me.
    thanks and regards

    Hi,
    To connect to non-Oracle databases from SQL*Developer youneed to download the relevant JDBC driver.
    This is detailed in the documentation in the User Guide -
    http://docs.oracle.com/cd/E35137_01/appdev.32/e35117.pdf
    in the section -
    Database: Third Party JDBC Drivers
    The Third Party JDBC Drivers pane specifies drivers to be used for connections to third-party (non-Oracle) databases, such as IBM DB2, MySQL, Microsoft SQL Server, or Sybase Adaptive Server. (You do not need to add a driver for connections to Microsoft Access databases.) To add a driver, click Add Entry and select the path for the driver:
    ■For IBM DB2: the db2jcc.jar and db2jcc_license_cu.jar files, which are available from IBM
    ■For MySQL: a file with a name similar to mysql-connector-java-5.0.4-bin.jar, in a directory under the one into which you unzipped the download for the MySQL driver
    ■For Microsoft SQL Server or Sybase Adaptive Server: jtds-1.2.jar, which is included in the jtds-1.2-dist.zip download
    ■For Teradata: tdgssconfig.jar and terajdbc4.jar, which are included (along with a readme.txt file) in the TeraJDBC__indep_indep.12.00.00.110.zip or TeraJDBC__indep_indep.12.00.00.110.tar download
    To find a specific third-party JDBC driver, see the appropriate website (for example, http://www.mysql.com for the MySQL Connector/J JDBC driver for MySQL, http://jtds.sourceforge.net/ for the jTDS driver for Microsoft SQL Server and Sybase Adaptive Server, or search at http://www.teradata.com/ for the JDBC driver for Teradata). For MySQL, use the MySQL 5.0 driver, not 5.1 or later, with SQL Developer release 1.5.
    You must specify a third-party JDBC driver or install a driver using the Check for Updates feature before you can create a database connection to a third-party database of that associated type. (See the tabs for creating connections to third-party databases in the Create/Edit/Select Database Connection dialog box.)
    Regards,
    Mike

Maybe you are looking for

  • Database logon failed when opening report with parameter values in CrystalReportViewer

    Hi, I designed 2 crystal reports: report A contains parameter fields and report B did not contain any parameter I can open both reports in development site using CrystalReportViewer control. When I open the reports in testing site, I can open report

  • Buttons are not displayed for the first time when drawImage method is used

    Hi In my swing window 2 buttons are there and when clicking these buttons, it should display an image . The two buttons are displayed at the first time and I can click on it . While clicking a button , the corresponding image is also got displayed. [

  • Best Practices for Publishing your Captivate Project

    Come join RealEyes tomorrow for a session on publishing Captivate projects. We will be discussing each method of publishing, and the benefits and drawbacks of publishing that way. We will also cover some of the common things missed that can make a be

  • DataModel dependent of values

    Hi, I have a jsf page using an inputText storing a value (such as a firstName), and a dataTable using a dataModel. The data come from the DB with the request (EJBQL): select p from Person p where p.firstName=:firstName I don't wnat to store the dataM

  • Calendar sync and daylight saving

    I have a 6720 classic which i sync with MS Outlook 2007 via OVI suite (latest versions of all software on PC and phone). New zealand has just put it's clocks back one hour for daylight saving. Since this has occured, my existing appointments on my ph