Date Parameters Toad/Oracle SQL Developer

Dear All, The code below works in TOAD but in the Oracle Sql Developer doesn't work it says the Start_date is not been declared. The ambersand doent work in Toad? Don't know why. Is there a reason for this.
I have been using Toad for a while, now they're rolling out Oracle Sql Developer as it is a free tool.
SET SERVEROUTPUT ON
SET VERIFY OFF
Variable start_date char(8);
BEGIN
     :START_DATE := TO_CHAR(TO_DATE('&1','YYYYMMDD'),'YYYYMMDD');
END;
BEGIN
     DBMS_OUTPUT.PUT_LINE(:START_DATE);
END;
Edited by: user531731 on 23/07/2009 17:18
Edited by: user531731 on 23/07/2009 17:19

My recommendation would be to write it correctly no matter the tool.
SQL> DECLARE
  2    START_DATE VARCHAR2(8) := TO_CHAR(TO_DATE('&1','YYYYMMDD'),'YYYYMMDD');
  3  BEGIN
  4    DBMS_OUTPUT.PUT_LINE(START_DATE);
  5  END;
  6  /
Enter value for 1: 20091010
old   2:   START_DATE VARCHAR2(8) := TO_CHAR(TO_DATE('&1','YYYYMMDD'),'YYYYMMDD');
new   2:   START_DATE VARCHAR2(8) := TO_CHAR(TO_DATE('20091010','YYYYMMDD'),'YYYYMMDD');
20091010
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • Using Data Modeler in Oracle SQL Developer

    Hi,
    Can anyone help me to learn the DataModeler in Oracle SQL Developer?

    You should post your question in the SQL Developer Data Modeler forum. This is the Oracle Forms forum.
    Craig...

  • Import of ERwinR8 data models into Oracle SQL Developer Data Modeler

    Hi!  My site want to move off ERwin R8 and use Oracle SQL Developer Data Modeler.  When will Oracle SQL Developer Data Modeler support the import of ERwin R8data model xml?
    Thanks very much,  Patty

    Hi,
    You can add the classic SCOTT schema with EMP/DEPT tables to a 10g Express Edition DB by running this script as SYSTEM:
    C:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN\scott.sql
    Also, you may wish to upgrade to the current version of SQL Developer:
    http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
    As for importing a .dmp file, you import it to the database, not SQL Developer. Please post that question to the appropriate forum.
    Regards,
    Gary Graham
    SQL Developer Team

  • Oracle SQL Developer O/P and Toad O/P is Different for Same QUERY.

    Hi,
    can any one calrify me why i'm getting different result when i run the same QUERY in Oracle Developer and TOAD.
    When i Ran a Query in TOAD i could see Null&Data in a column called Customer_Category but when i Ran the same Query in Oracle SQL Developer i'm getting all Null N i couldnt see any data in the column.
    i have not performed any DDL r DML statement, just i got the Query and i Ran it in TOAD & Oracle SQL Developer.
    I found that the OUT PUT is different for perticular column.
    Thanks in Advance....

    > I found that the OUT PUT is different for perticular column.
    The RENDERING of data from Oracle (or any other server such as a POP3 server, web server, etc) IS DONE BY THE CLIENT.
    So to repeat - RENDERING IS DONE BY THE CLIENT.
    If one client selects to display the output received from the server differently than another client, it is a CLIENT ISSUE.
    It is not a server issue. It is not a SQL issue. It is not a PL/SQL issue.
    In other words, wrong forum for this question. You have a pure client side rendering problem which has absolutely nothing to do with SQL and/or PL/SQL.

  • Urgent Help !!!  Export data into insert format (Oracle Sql developer)

    Hi all,
    Please help , when i try to export ms access table which have 400,000 over rows to insert format using oracle sql developer 1.5.5. After the export have done the exported file xxx.sql is empty.
    Is it because of too many rows? or what tool or function should i use for exporting table with many rows.
    It used to have exported successfully with
    Insert into table( ) values ();
    Insert into table( ) values ();
    Insert into table( ) values ();
    Insert into table( ) values ();
    ----- when i try to export table with over 10,000 row.
    Regard,
    Tun

    Another option is to export your file as Formatted text (space delimited). This will create a fixed format file. You can either create an external table to access the file or use sqlloader to load it. In your control file or access parameters you will specify the positions of the fields you are interested in. Your control file will look something like this:
    OPTIONS (BINDSIZE=50000,ERRORS=50,ROWS=200,READSIZE=65536)
    LOAD DATA
    CHARACTERSET US7ASCII
    INFILE '/home/FIXED_FORMAT.dat' "FIX 58"
    CONCATENATE 1
    INTO TABLE "EMP2"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    "ID" POSITION(1:2) INTEGER(2) ,
    "REGION" POSITION(3:3) INTEGER EXTERNAL(1) ,
    "DEPT" POSITION(4:6) INTEGER EXTERNAL(3) ,
    "HIRE_DATE" POSITION(7:14) DATE(8) "mmddyyyy" ,
    "SALARY" POSITION(15:19) DECIMAL(9,2) ,
    "NAME" POSITION(20:34) CHAR(15)
    SQLDeveloper does not currently provide an option to import fixed format files.

  • Differences between TOAD for Oracle and Oracle SQL Developer?

    Does someone know the advantages and disadvantages of using TOAD for Oracle and Oracle SQL Developer?
    I work making reports with TOAD, but in a few days I will have to use the SQL Developer (because it´s free) unless I justify the necessity of using TOAD.
    Could some that used both compare them?
    Thanks,
    Facundo.

    Hello Facundo,
    since we are rolling out new client PCs we switch from Toad to SQL Developer. Therefore I'm doing some training for the "normal" users and our developers.
    Most users simply want to have access to the data in tables and views. For those there are 2 main issues:
    - Filters get lost when exiting table while sorting is still applied. Since there is no way to apply filtering before entering the data tab this can become a great performance issue because sorting is applied to many many rows. For views it is sometimes impossible to open the data tab.
    - Exporting date values to Excel needs some know how if you want to sort by this column in Excel, because the date is formatted as "Standard" meaning that the sorting is done as for a text column: 01.01.2009 is less than 02.01.2008. Here you have to use a workaround column with a formula (=1*<datecolumn>)
    The greatest Pro is the easy sharing of connections and reports by XML files.
    Our developers like the easy debugging in SQL Developer. Though they miss the feature that the source is compiled for debug automatically as in Toad. For this we have distributed a script that compiles any PL/SQL object for debugging.
    There are only some Toads installed for DBAs and for users that need access to tables protected by policies that require authentification by OS user since this information is not passed under every circumstance.
    Regards
    Marcus

  • Oracle SQL developer tool vs toad

    Hi - I am trying to do a feature comparison on these 2 tools and am not very familiar with them could someone please tell me if Oracle SQL developer tool has these features:
    Project Manager
    Result Set Compare
    Chart Designer
    Toad Report Wizard
    Pivot & Chart
    Data Compare and Synch
    Automation
    Simple Cross-Platform Queries
    Advanced Cros-Platform Queries
    Local Data Storage
    Data Transformation and Cleansing
    Data Browser
    ER Diagrammer
    Charts & Pivot Table Reports
    Automation & Scheduling Engine
    Data Compare & Sync
    Cross-connection Query

    Hi!
    I have worked with several Oracle IDE's in the past:
    * TOAD
    * PL/SQL Developer
    * Navigator
    * SQL/Developer
    Right now I tend to do most of my work with SQL-Developer and only some tasks with TOAD.
    SQL-Developer feels faster and has a cleaner interface than TOAD, while TOAD has better tools.
    Im currently publishing a series of tips for SQL-Developer in my blog:
    http://oracledeli.wordpress.com/
    Some of the posts are focussing on overcomming SQL-developers disadvantages versus TOAD:
    * SQL-Developer: Using macros http://oracledeli.wordpress.com/2011/09/28/sql-developer_using_macros/
    * Execute current worksheet file via SQL*Plus (external tools) http://oracledeli.wordpress.com/2011/09/23/sql-developer_execute_via_sqlplus/
    Best regards,
    Matt
    Best regards,
    Matt

  • Different out in Toad and in Oracle SQL Developer

    Hi
    The below script
    DECLARE
    g_run_date DATE := '02-OCT-09';
    s_date date;
    e_date date;
    BEGIN
    SELECT TRUNC(TO_DATE(g_run_date + ((-1)* (TO_CHAR ( g_run_date + 1, 'D'))), 'DD/MON/YYYY'),'DD')start_of_week,
    TRUNC(TO_DATE (g_run_date + (6 - (TO_CHAR (g_run_date + 1, 'D'))), 'DD/MON/YYYY'),'DD')end_of_week
    INTO s_date,
    e_date FROM DUAL;
    DBMS_OUTPUT.PUT_LINE ('Start_of_week :' || s_date) ;
    DBMS_OUTPUT.PUT_LINE ('End_of_week :' || e_date) ;
    end;
    When ran in toad gives
    Start_of_week:25-SEP-09
    End_of_week:01-OCT-09
    When ran in Oracle SQL Developer gives
    Start_of_week:26-SEP-09
    End_of_week:01-OCT-09
    why this occurs?
    Cheers
    MJ

    Hi Pavan
    i'm getting the below output, but i dont know why i'm getting 25-Oct-09 in toad
    SQL> DECLARE
    2 g_run_date DATE := '02-OCT-09';
    3 s_date date;
    4 e_date date;
    5 BEGIN
    6 SELECT TRUNC(TO_DATE(g_run_date + ((-1)* (TO_CHAR ( g_run_date + 1, 'D'))), 'DD/MON/YYYY'),'DD'
    )start_of_week,
    7 TRUNC(TO_DATE (g_run_date + (6 - (TO_CHAR (g_run_date + 1, 'D'))), 'DD/MON/YYYY'),'DD')end_of_w
    eek
    8 INTO s_date,
    9 e_date FROM DUAL;
    10
    11 DBMS_OUTPUT.PUT_LINE ('Start_of_week :' || s_date) ;
    12 DBMS_OUTPUT.PUT_LINE ('End_of_week :' || e_date) ;
    13
    14 end;
    15 /
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> /
    Start_of_week :26-SEP-09
    End_of_week :02-OCT-09
    PL/SQL procedure successfully completed.

  • Oracle SQL Developer vs Navicat Oracle vs Toad

    I've been using MySQL and planning to migrate it to Oracle, but, I'm looking for an admin tool for Oracle and heard that Navicat for MySQL is now available for Oracle. It can create, edit databases, import/ export data,etc, so many features, I tried Toad for Oracle too. It's good but very expensive.
    Navicat for Oracle and Oracle SQL Developer have a free version and I'm choosing between them. I am now in the dilemma :(

    SQLDeveloper, of course :>
    Kind of a biased answer, with this being a SQLDeveloper forum... but the cost, active forum, and cross-platform capability win the argument for me.
    I've used both the MySQL supplied tools (administrator, query browser) as well as SQLDeveloper for a while, and I'm now more at home with SQLDeveloper than the others. It feels "right" for me, so when I'm working with both databases, SQLDeveloper is the tool I use.
    Support for MySQL is limited compared to what it can do for Oracle (obviously, it's an Oracle tool), and if you want to do DDL on a MySQL database, you can't point and click (you've got to type the commands in the worksheet), but for most of my work, I can do what I need using it.
    Plus, there's always the backup of the MySQL tools for those tasks you can't do in SQLDeveloper.
    Regards,
    John

  • Oracle SQL Developer Data Modeler 3.0 Bugs, Resolution and workarounds

    The purpose of this thread is to list bugs discovered while using ORACLE SQL Developer Data Modeler 3.0
    Mainly with SQL SERVER 2005 and ORACLE 10g models.

    SQL Server Physical model doesn't save table identity column.
    here are the steps to get this bug:
    1. create a table in relational model with a column as an integer to be used as an identity.
    2. create or open a physical model for SQL-SERVER 2005
    3. open the table in the physical model
    4. edit the integer column property dialog
    5. tick the identity check box and close the property dialog
    6. save the model and close it
    7. open it again, you will find the identity check is removed! (probably not saved from the start)

  • Using DEBUG Mode in Oracle SQL Developer Data Modeler to Log SQL

    Hello,
    I am looking for the possibilty to enable the logging of SQL in Data Modeler.
    Jeff Smith wrote an article how to do this for SQL Developer, for Data Modeler there are other configuration files. Does anyone have an idea?
    Best regards,
    Joop

    Hello Philip,
    the URL to the article of Jeff is: http://www.thatjeffsmith.com/archive/2012/10/using-debug-mode-in-oracle-sql-developer-to-log-sql/
    in the install directory of Data Modeler 3.3.0.734 exists a file datamodeler\datamodeler\bin\datamodeler.conf. This analogue the situation for sql Developer.
    However in this file there is no reference to a (non)debug file.
    In ide/bin directory there is a ide-logging-debug.conf and ide-logging.conf file. But they are not referenced. Should one of them be included?
    Joop

  • Oracle SQL Developer Data Modeler Versus SQL Developer

    Friends,
    I'm trying to understand the differences between Oracle SQL Developer Data Modeler and the ability to use the Data Modeler in SQL Developer.
    I've looked at both products home pages on OTN, http://www.oracle.com/technology/products/database/datamodeler/index.html & http://www.oracle.com/technology/products/database/sql_developer/index.html and would appreciate your comments on my findings so far
    1) The Oracle SQL Developer Data Modeler is a stand-a-lone chargeable product whereas the use of the Data Modeler functionality of SQL Developer is free
    2) The Data Modeler functionality within SQL Developer is basically a "viewer" I can create ERD's of my existing tables by dragging them into the modeler from the object navigator but that's about it. I can't save the diagram for later use or use it to change the structure of the table(s)
    3) If I need to have "Oracle Designer" like ERD capabilities then I need to use Oracle SQL Developer Data Modeler (after purchase!)
    4) Are there any other differences I have missed?
    Thanks in advance

    You can open any diagram created in the stand-alone product in the SQL Developer Data Modeler Viewer and navigate through all property dialogs and the full navigator, just like you can in the stand-alone product, but with no update capabilities. This allows developers to fully review the model and all properties, without making changes.
    Sue

  • Data Transformation Service (DTS) available in Oracle SQL Developer?

    Hi All,
    Sorry to bother you again. Is Data Transformation Service (DTS) available in Oracle SQL Developer? So far I cannot find it. For example, i want merge First Name, Last Name column from Access,excel or cvs to migrate as Full Name in Oracle or Full name in Access,Xls or cvs split into First name & last name column in Oracle. What method or service should I use.
    Regards,
    Tun Tun

    On wikipedia, I see that's a SQL Server component, so I don't think it's possible to use it in any other program.
    But you can always tweak columns through normal queries, and even create a new table based on that, like
    CREATE TABLE Table_New AS
    SELECT First_Name || Last_Name FROM Table_OldHope that helps,
    K.

  • How to view execution history for any date in oracle SQL developer tool ?

    hi, i want to view some executed queries(2 months before) in oracle SQL Developer. if i press F8 it shows execution history for only last 30 days. is there any option(query) or something to view execution history for specific date ? i want to see some queries, which is executed before 2 months in my oracle SQL developer tool. Pls help me out.

    sb92075 wrote:
    943838 wrote:
    hi, i want to view some executed queries(2 months before) in oracle SQL Developer. if i press F8 it shows execution history for only last 30 days. is there any option(query) or something to view execution history for specific date ? i want to see some queries, which is executed before 2 months in my oracle SQL developer tool. Pls help me out.it will never occurWhy not? Are you a member of the product team that develops SQL Developer?
    To the OP, there is a forum for SQL Developer
    SQL Developer
    And there's also a sticky on the forum for product enhancement requests
    "Feature Requests, Extensions and General Collateral "
    Cheers,

  • Oracle SQL Developer Data Modeler

    Hi Guys,
    Is it possible to generate the data model design with Oracle SQL Developer Data Modeler and save such that other programs can open it?
    For example visio and how can I achieve that?
    Thanks

    no,
    Philip

Maybe you are looking for

  • How to send e-mail when a trigger condition is verified?

    Hi, I want to implement a trigger to send an e-mail when the condition of the tigger is verified. Thanks in advance. Paulo.

  • H.264 TS playback fail in Quicktime

    Recently Hong Kong started the digital TV broadcasting. Which using H.264 Transport Stream as standard, however, when I use the set top box to record the program. It cannot be play back in Quicktime. As I know Quicktime support H.264, is there any re

  • DSL Line Disconnections

    Hey guys, new poster here. Recently my interent connection has been playing up somewhat, it's perfectly fine during the day but once it hits about 4 o'clock in the afternoon it periodically disconnects regularly in intervals of 2-15 minutes. I've che

  • Refreshing on a particular report in a dashboard

    Hi Team, Here I am with a question. I have a dashboard which consists 4 reports whose values are drill through from one of the report. Say if I click year in 1st report, its quarters will be displayed in the 2nd report. Now, my issue is when click a

  • Error accessing Business Rules from EAS

    Hi, I am using EPM System 11 and trying to access Business Rules via Essbase Adminstration Services Console (EAS). When I open up the Business Rules node from Enterprise View, and select Repository View > Rules, a list of all the Business Rules is di