Prompt for bind variables in SQL developer

Hi!
Just installed the latest 3.2 version of SQL Developer, and tried to do an explain plan.
Now the tool prompts me for values for the bind variable. It didn't do that in my previous version (version 3. something).
Thats anoying :-)
How do I disable that feature?
Example:
explain plan for
select * from emp
where department_id = :1;
If i right click on the statement or press F10, I get no prompt for the bind variable...
Regards
Søren

Old fashioned way, like this:
EXPLAIN PLAN FOR
SELECT * FROM scott.emp
where deptno = :1;
SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());
Executed with F5 gives me this output
plan FOR succeeded.
PLAN_TABLE_OUTPUT
Plan hash value: 3956160932
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 5 | 190 | 3 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| EMP | 5 | 190 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("DEPTNO"=TO_NUMBER(:1))
13 rows selected

Similar Messages

  • Prompt For User Input in SQL Developer

    I am using the '&' in a very basic SQL select script, but I do not get a prompt for my input. However, i have used the '&' in update scripts and it does prompt me.
    For example:
    select DCC_DESCRIPTION
    from S_TBLDTMINOR
    where DCC_DTMINOR = &Minor;
    Gives an ORA-01008 error (not all variables bound).
    If it's a varchar field and I use '&Minor' - it executes with no error, but does not prompt for data. Please note:  this script works when it's run in SQL*Plus, but not in SQL Developer.
    If I execute:
    update S_TBLDTMINOR
    set DCC_DESCRIPTION = 'Mark & Wilson'
    where DCC_DTMINOR = 'AAA';
    It does prompt me for a value (but I do not want it to).
    So I know prompting works in SQL Developer, but it does not work in select statements.
    Is this a configuration setting I can change in SQL Developer? I know I can use the escape in the update statement to avoid the prompt, but I'm not concerned with that. I'm trying to get the prompting to work in the select statement.
    Edited by: user12289057 on Feb 23, 2012 11:17 AM

    Hi user12289057,
    1/Not sure what your testcase is (including table definition), I was trying to reproduce with:
    select * from dual where dummy = '&myin'
    2/Try
    undefine Minor
    to ensure Minor is not already set.
    3/Minor may need to be quoted if it is a string.
    Short blog post on substitution and bind variables.
    http://totierne.blogspot.com/2010/04/substitution-and-bind-variables.html
    -Turloch
    SQLDeveloper team.

  • Bind variables in SQL Developer

    I declared a bind variable called 'test_num' and assigned a value of 10 as shown below.
    variable test_num number
    BEGIN
    :test_num := 10;
    dbms_output.put_line ('The Test Value: ' || :test_num);
    END;
    When I execute the above program, the output is thrown as 'The Test Value: '. The value of test_num is not shown. I fear whether this issue is due to SQL Developer which i am using to execute this program.
    Please let me know why the value is not getting printed
    Thanks for your help!

    I see the same issue you are seeing when using the bind variable. The bind variable works fine in SQL*Plus but not from SQL Developer.
    From SQLPlus*
    SQL> set serveroutput on
    SQL> variable test_num number
    SQL> BEGIN
    2 :test_num := 10;
    3 dbms_output.put_line ('The Test Value: ' || :test_num);
    4 END;
    5 /
    The Test Value: 10
    PL/SQL procedure successfully completed.
    From SQLDeveloper*
    set serveroutput on
    variable test_num number
    BEGIN
    :test_num := 10;
    dbms_output.put_line ('The Test Value: ' || :test_num);
    END;
    anonymous block completed
    The Test Value:

  • Turn off Prompt for changes internal in SQL Developer

    We have created an SMS package to deploy SQL Developer in our organization.
    We would like to turn off the "check for updates switch".
    Is this a registry setting or in one of the files

    Thanks for the insight.
    I have been checking out the tool.
    We are going to use it to replace TOAD in 2008.
    Hopefully, it will stay "Free"!

  • Using Bind variables in SQL PLUS Report

    using Bind variables in SQL PLUS Report. This report gets the arguments from the application concurrent program. Now my need is to convert the start_date and end_date to bind Variables to improve the performance. I have commented the original code in 'prompt List of Unapproved Adjustments' and used my Bind Variable but it is giving an error
    error: Bind Variable "ENDING_DATE" not declared
    Report Date and Time:
    26-OCT-2010 15:44:13
    List of Unapproved Adjustments
    Bind Variable 'ENDING_DATE" not declared
    Please see below the code for the sql plus report:
    define p_org_id           = '&1'
    define p_fy_begin_date = '&2'
    define p_start_date = '&3'
    define p_end_date = '&4'
    define p_conversion = '&5'
    declare
    variable begin_date date;
    exec :begin_date := p_start_date;
    variable ending_date date;
    exec :ending_date := p_end_date;
    /* Begin
    :begin_date := to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS');
    :ending_date := to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS');
    End; */
    set newpage none
    set termout off
    set pagesize 55
    set linesize 180
    set heading on
    set feedback off
    set wrap off
    set space 1
    set heading on
    begin
    dbms_application_info.set_client_info('&p_org_id');
    end;
    prompt
    prompt Report Date and Time:
    prompt ----------------------
    select to_char(sysdate,'DD-MON-YYYY HH24:MI:SS')
    from dual ;
    prompt
    prompt List of Unapproved Adjustments
    prompt -------------------------------
    select b.trx_number,
    a.adjustment_number,
    f.user_name created_by
    from apps.ar_adjustments a,
    apps.ra_customer_trx b,
    apps.fnd_user f
    where a.customer_trx_id = b.customer_trx_id
    and a.status <> 'A'
    and a.created_by = f.user_id
    and a.creation_date between :begin_date
    and :ending_date
    -- and a.creation_Date between to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS')
    -- and to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS')
    order by
    b.trx_number ;

    Hi
    Please go to customization part of the report and verify..You have set a default value out there ..And also verify your lov and look at the values ..If it is again giving you the problem ..pl delete the report and develop it again from the scratch it will be solved...
    vishnu
    null

  • Passing values in a vector list as bind variables in sql query.

    Hi,
    I have a vector list containing values 12,13,14.
    vector<string> v;
    v has values 12,13 and 14.
    Here the number of values in vector list are not fixed.
    I want to pass these values as bind variables to sql query.
    Can anyone suggest me how to do this.
    Thanks in advance!!

    Ah, the it's the classic 'Varying In-List' again
    See:
    The Tom Kyte Blog: Varying in lists...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:110612348061 (started more than a decade ago, so scroll down for more recent examples)

  • Calendar prompt for Date variable from bex

    Hi All,
    I have a Bex query where I have a variable on 0CALDAY
    - Customer exit (i_step = 1 to populate with current date)
    - Single value
    - Mandatory
    I created universe on this query and in webI selection screen i do see the variable prompt.
    I am not able to see the current date populated automatically since exit values are not populated to WebI at runtime.
    My problem is that in WebI selection screen we get list of date values from the info provider instead of Calendar prompt
    where user can enter the values directly.
    I am currently on BO XI 3.1 SP3.
    Is there any specific setting in Universe or bex query which is required to get this Calendar prompt instead of list of values for dates?
    Note: When we were on SP1 the universe created then had same variable from bex and it still shows us Calendar prompt but ever since we upgraded to SP3 for the query splitter functionality we not able to get the calendar prompt for date variable in new universe we create
    Thanks
    Ritesh

    Yep.
    Now tell me how you want to show that Prompt @ WebI report level.
    My problem is that in WebI selection screen we get list of date values from the info provider instead of Calendar prompt
    where user can enter the values directly. Exactly, i didn't get this??
    @Prompt:
    You have flexibility to show options like:
    Mono/Multi: User can select Single value or Multiple.
    BW Variable: Same we have (Single/Multiple)
    Free/Constrained: User can Enter his/her value directly or No change option.
    BW Variable: By defalut you will get this, once you made it to Optional input.
    Persistent/Not_Persistent: Refreshed report has to show last selected value means use Persistent otherwise Not_P.
    By seeing the Prompt syntax , I can say your Variable is after Customer Exit, Correct??
    Workaround for your Problem is:
    <FILTER KEY="ZV_DATE"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Date (Previous Day)','A','Date\LovDate (Previous Day)Base',mono,primary_key)"/></CONDITION></FILTER>
    You have to remove that Date class and objects from prompt syntax. Because of that it showing up LOV's not calendar.
    Like:
    <FILTER KEY="ZV_DATE"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Date (Previous Day)','A',',mono,primary_key)"/></CONDITION></FILTER>
    Why, It should be blank??
    Because Date needs no class\object to show up, by default you will get Calendar on the fly.
    Hope you got my point.
    Thank You!!

  • Adcfgclone.pl dbTier is not prompting for ORACLE_HOME variable

    hi,
    adcfgclone.pl is not prompting for ORACLE_HOME variable.
    and erroring out with
    Checking the port pool 12
    done: Port Pool 12 is free
    Report file located at /appsutil/out/portpool.lst
    RC-00203: Unable to create/write to file /appsutil/out/portpool.lst.
    Complete port information available at /appsutil/out/portpool.lst
    RC-50004: Error occurred in CloneContext:
    AC-00005: No write permissions for creating the Context file - /appsutil/temp.xml
    Raised by oracle.apps.ad.context.AppsContext
    Check Clone Context logfile /mnt/ebs/PTCH/bin/db/tech_st/12.1.0/appsutil/clone/bin/CloneContext_0421032159.log for details.
    ERROR: Context creation not completed successfully.
    For additional details review the file /tmp/adcfgclone_6999.err if present.
    DOC refrred: How To Quick Solve This Post Clone Error : RC-50004, AC-00005: No Write Permissions For Creating The Context file - /tmp/temp.xml ? (Doc ID 842948.1)
    in the above DOC please let me know how to perform ANALYSIS part..
    Database version: 12.1.0.2.0
    Applications version: 12.1.3
    OS                         : OEL6.4
    please suggest
    Thanks
    Raghavendra

    are you able to create a file with os user which is running the rapidclone in /appsutil/temp.xml
    please check and update
    use touch command to create a file
    did you gave correct oracle home when prompted by rapidclone ?
    If you have set the right permissions at /tmp and the problem remains then check if at the post cloning steps at the dbTier, the scripts asks for the "Oracle Database Home"
    Target System RDBMS ORACLE_HOME Directory [/u01/clone/db/11.2.0/] :
    post the output of below command
    $ls -ltr ( in appsutil folder )
    AppsMasti
    sharing is Caring

  • How to maintain Entries for VIEWS in ORacle Sql developer

    hi gurus,
    Could you please help in maintaining an entries for VIEW is Oracle SQL develope...I have created a VIEW by name SD_WH08....now i need to maintain some entries in this for my testing purpose...how do i do this?
    Your help is very much appreciated.
    Regards

    What do you mean by "maintaining an entries for VIEW" ?
    K.

  • 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

  • Bind variables in SQL query of DBAdapter

    Hi,
    Can we add bind variables to SQL query when we define DB adapter...?

    No, not in the Wizard.
    I do not know if it is possible with the TopLink in combination with BPEL.
    But can you use a Pl/SQL procudere/package that performs the dynamic SQL?

  • Asking for bind variable where none is needed

    Good Morning,
    I am still working these regexp date_time project.
    I have a problem where oracle is asking for a bind variable where it doesn't need any as far as I can see. I am trying to capture various date times in a column and formatting them into one default format used by oracle. Here is what I got which works before I wrap it in the TO_DATE function
    There are many when then's but I am using only one here.
    select case
    when regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}') is not null
    then regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}')
    else date_time
    end as new_time
    from raw_data;
    The above statement works
    Now when I want to format the date that I found with this:
    select case
    when regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}') is not null
    then TO_DATE('regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}')','MM/DD/YYYY')
    else date_time
    end as new_time
    from raw_data;
    I get a request to insert a value for the digit as a bind variable. The digit should be populated from the when statement when it returns not null when a date is found.
    Could some one please tell me even if what I wrote here is even possible or make a suggestion to the syntax to get around this issue?
    All this is going to be incorporated into an update statement later on.
    I am running this on sql developer, oracle 11g.
    Thanks for your help in this matter in advance.
    regards,
    Al

    From looking at the code, as you have not supplied any scripts to create a table and demonstrate the error...
    Your case statement is trying to return two types
    select case
    when regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}') is not null
    then TO_DATE('regexp_substr(date_time,'^(0?[1-9]|1[0-2])/(0?[1-9]|[1-2][0-9]|3[0-1])/9[[:digit:]]{4}')','MM/DD/YYYY')
    else date_time
    end as new_time
    from raw_data;or simply
    select case when <expr>
                then <RETURN A DATE>
                else <RETURN A VARCHAR2>
            end as new_time
      from raw_data;The column cannot be both.
    Sorry I don't know your requirements.
    You could drop the else part and just return the converted date.
    You could fetch it back in two columns, the ones you can convert in one column (Which would be an oracle date type),
    the ones you cannot convert in another (which would be varchar2).
    Cheers,
    GP>

  • Prompted for Substitution Variable at Startup?

    Ever since I've been on version 1.2.0.29.98, when I start up SQL Developer and attempt connection to one of my databases, I get a modal popup window titled "Enter Substitution Variable" with OK and Cancel buttons. The name of the substitution variable I'm prompted for is GNAME.
    I have a couple of different Oracle homes on my machine, and I recognize gname as a lexical parameter I use in "login.sql" scripts for SQL*Plus (see http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:446220075876). Can you tell me from where SQL Developer might be picking up this lexical parameter for which it insists on substituting a value? The popup is annoying, and I'd prefer to make it go away.
    At first I thought it may have been due to a login.sql I have that lives in the same directory as the one I specified containing SQL*Plus (Tools -> Preferences; SQL*Plus -> SQL*Plus Executable), but even after I rename that login.sql's filename, the GNAME substitution persists.
    Thank you.
    Windows XP SP 2
    SQL Developer 1.2.0.29.98
    Database 9.2.0.6

    Someone else asked the same thing this morning:
    Replacement Variables/Column formatting in SQL*Developer
    At the moment, sqldev tries executing a "login.sql" from the Script Directory. If that doesn't exist, he looks for it in the sqlplus path. No other possibilities nor preferences.
    K.

  • Error When Prompting for Substitution Variable

    Hi - I'm receiving an error when I try to run the following using the substitution variable - but only when I enter a string; when I enter a numeric value it runs fine.
    DECLARE
        l_SCR_Info            VARCHAR2(50) := '''SCR'||&SCR_NUM||'-'||'''';
    begin
    dbms_output.put_line(l_SCR_Info);
    end;Here is the error I receive when I supply a string value when prompted:
    ORA-06550: line 3, column 52:
    PLS-00201: identifier 'AB' must be declared
    ORA-06550: line 3, column 27:
    PL/SQL: Item ignored
    ORA-06550: line 10, column 22:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 10, column 1:
    PL/SQL: Statement ignoredCan anyone shed some light on what I'm missing here?
    Thanks!
    Christine

    Hi,
    It looks like you just want one string there:
    l_SCR_Info            VARCHAR2(50) := '''SCR&SCR_NUM-''';Remeber how substitution variables work: SQL*Plus replaces them with values before sending the code to the back end to be compiled.
    If you give a value like AB for the variable, the code you posted is equivalent to:
         l_SCR_Info            VARCHAR2(50) := '''SCR'|| AB ||'-'||'''';by the time it reaches the compiler. AB is not inside quotes, so the compiler looks for a variable or function called AB.
    If you gave a number:
         l_SCR_Info            VARCHAR2(50) := '''SCR'|| 123 ||'-'||'''';there's no problem; the compile knows what the literal number 123 is.

  • Got an error while creating bind variables using sql database.

    iam going to use sql database for ADF-BC .
    i created the bind variable and apply the bind position for the corresponding variable in the view object editor.when i click test it shows me "query is valid". when i tried to run that it gives me two errors.
    1) sql error during statement preparation.(ie) select empid ,empname......from the emptable where empid like :'emp' and
    2) [Microsoft][SQl server  2000 driver  for jDBC] invalid parameter bindings
    i need help to know the solution for this...(or) is there any other way to create bind variable ......

    The 3 binding styles supported by JDev:
    Oracle Named - ie. SELECT xxxx FROM xxxx WHERE emp_id = :vEmp (note colon and variable name)
    Oracle Positional - ie SELECT xxxx FROM xxxx WHERE emp_id = :1 (note colon)
    JDBC Positional - ie SELECT xxxx FROM xxxx WHERE emp_id = ?
    Literally this query is sent to the database to execute, then the bind variables values are applied as a separate database operation. If SQL Server doesn't suport any of these binding styles, it's not going to work. As Chris Noonan suggests, try the JDBC Positional style though as you're using a JDBC driver to connect to SQL Server and it should support that style (the others are Oracle styles), and make sure you've switched the binding style on the VO query page to "JDBC Positional" too.
    You must also on the VO bind variable page define your bind variables.
    Also read the 10.1.3 JDev guide on ADF Business Components and View Object bind variables.
    CM.

Maybe you are looking for

  • Problem with Send and Receive Emal In SAP System

    Hi gurus! I have a following quote: Dear ! I have a problem with send and receive email in SAP system following : I want to test send and receive email in local network at my company. I had two server Server 1 : I setup Exchange Mail Server 2007 with

  • I need to buy some new hard drives for my Mac Pro

    I had an extra internal hard drive in my Mac Pro, a Seagate one, that suddenly stopped working and I needed to send it to a data recovery company, so... Now I'd like to - Install a new internal HD - Install a NAS with two/three disks. (Hitachi if pos

  • GUI Components & Graphical drawings

    Hi, I�m new to Swing (haven�t done much GUI since Motif!) and I�m a little confused about the relationship between GUI components and �drawn� graphics. In my application I have two JPanels � an upper and a lower � that display two views of the same d

  • Start up issues/ disk utility question

    I can't get my iMac to start up past the grey apple screen. I booted off my Tiger disk and ran disk utility. My permissions were ok, but when I try and verify and repair the HD I get the following errors: 'invalid key length invalid node structure re

  • Building a flash version update screen...

    hi, I am a flash developer and I am working for a project for a wide spread organization.. I made my project compatable with Flash Player 10.0 and I need to make sure that everybody that runs the site and has a lower version of flash player will be p