How to ask the user to type in the select statement

Hello

Can anyone tell me the syntax of the select statement where I can ask the user to enter the value.

for example, I try to use belowthing, but it displays error

Select * from emp where empname =: empname

SP2-0552: Bind "empname' undeclared variable.


2. is there a dictionary of data table to see all pl/sql procedures and corresponding code?


Thank you
Sri

Try:

select * from emp where empname='&empname';

L.

Tags: Database

Similar Questions

  • How to use the select statement in loop for

    Hi all

    My question is can I use a select statement in for loop like as follows.

    for the key in the selection of one_table key.

    When I use this am getting an error as found select invalid I ID

    How to select a statement use in loop for

    Please suggest me.

    Thank you
    Sree

    Hello

    You can use code below

    For key in (select button from table_a)
    loop
    If key.key = 1 then
    -insert statement
    on the other
    -Select statement
    end loop;

    Thank you
    Naveen.

  • [JS CS5] How to get the selected state of a multi-state object

    Does anyone know if there is a way to identify the State of a multi-state object is selected?

    You can select different States of an object of several State in the States Panel.

    In the object model.

    Mon_etat = app.selection [0].states.item (0);

    myState.active = true;

    .. .all the first State to the DSO. But I can't understand how to identify the State in which is currently visible. This doesn't seem to be possible in the object model, unless I'm missing something. Any ideas?

    Hey!

    Take a look at 'activeStateIndex' of MSO.

    Hope that helps.

    --

    tomaxxi

    http://indisnip.WordPress.com/

  • JCheckBoxMenuItem with Action aid - how to get the selected state

    Hello

    I have a JMenu with some JCheckBoxMenuItems. I want to use with an Action. Is it possible to get the status of the Action CheckBoxMenuItem selection?

    Thanks in advance
    Dominik

    Swing only updates the Action.SELECTED_KEY property if it has been set, so when you create your action you must set this value.

    myAction.putValue(Action.SELECTED_KEY, false);
    
  • How to write the SELECT statement

    Commission of the CARDS
    0-20 0
    21-25 500
    26-31 650
    32-36 850
    37 > 1050


    If a PERSON sells 28 cards in one month, commission would be calculated as below.

    25 * 500 = 12500
    3 * 650 = 1950

    Total commission 14450

    I guess that's what you're looking for...

    CREATE TABLE WG (A NUMBER);

    INSERT GT VALUES (0);

    INSERT GT VALUES (28);

    SELECT * FROM GT

    0
    28

    SELECT THE CHECK BOX
    WHEN IS > = 0 AND<=20 then="">
    WHEN WAS > = 21 AND HAS<=25 then="">
    WHEN WAS > = 26 AND HAS<=31 then="">
    WHEN WAS > = 32 AND HAS<=36 then="">
    WHEN > = 37 THEN 36 * 850 + (A-36) * 1050
    ON THE OTHER
    NULL VALUE
    END TEST
    THE GT;

    Output:

    0
    14450

    Thank you...

  • Need to know how long takes the Select statement of the cursor?

    Hi people
    I want to know the duration of execution of the cursor in a stored procedure.

    Piece of my code is provided below.

    procedure Process_PCN_MAT_Custs)
    p_PCN_OID in varchar2,
    p_days_back number
    ) is
    number of vcount;
    v_newoid varchar2 (16);
    date of pcn_create_date;
    T_DATE: = to_char (sysdate, ' dd/mm/yyyy hh24:mi:ss');
    cursor (SAP_Customers)
    x_PCN_OID varchar2,
    number of x_days_back
    date of x_pcn_create_date
    ) is
    Select
    KUNNR,
    Max (soldflag) soldflag,
    Max (shipflag) shipflag,
    Max (endflag) endflag,
    Max (custName) custname
    de)
    Select / * + DRIVING_SITE (bims_pcn_shipments) * /.
    KUNNR,
    SoldFlag,
    ShipFlag,
    EndFlag,
    custName
    Of
    bims_pcn_shipments_mview

    where
    material_number in (select sap_material_no from the pcn.material where pcn_oid = x_PCN_OID)
    and bdr_date > (x_pcn_create_date - x_days_back)

    UNION
    Select / * + DRIVING_SITE (bims_pcn_shipments) * /.
    KUNNR,
    SoldFlag,
    ShipFlag,
    EndFlag,
    custName
    Of
    bims_pcn_backlog_mview

    where
    material_number in (select sap_material_no from the pcn.material where pcn_oid = x_PCN_OID)
    and bdr_date > (x_pcn_create_date - x_days_back)

    )
    Group
    KUNNR;
    dbms_output.put_line to_char (v_date);

    Begin
    Open SAP_CUSTOMERS
    ---
    ---
    ---
    close SAP_CUSTOMERS
    end

    I get an error of compilation for this line [T_DATE: = to_char (sysdate, ' dd/mm/yyyy hh24:mi:ss');].
    Saying "+ Error (95,12): PLS-00103: encountered the symbol"="when expected as follows: constant exception < an ID > < a double quote delimited identifier > table Fedya double Ref char time timestamp interval date binary character national nchar"< an ID >"symbol has been replaced for"="continue +.»

    I would be grateful if someone can help me solve this weired compilation error.

    Thank you
    Vineet

    Then you need to go to the function [DBMS_UTILITY. GET_TIME. http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_util.htm#sthref7809].

    Something like that...

    n := dbms_utility.get_time;
    
    dbms_output.put_line( (dbms_utility.get_time-n)/100) || ' seconds....' );
    

    Published by: Karthick_Arp on January 16, 2009 05:07

  • How to use the Type of Oracle Table values in the Select statement.

    Hello

    I get the initial set of values in the Table of Type Records of the Oracle and want to use the list of values in the Select statement.

    For example, try something like the following:

    TYPE t_record () IS RENDERING
    ID TABLEA.ID%type,
    NO TABLEA.NO%type

    );
    v_record t_record;
    T_table TYPE IS the v_record TABLE % TYPE;
    v_table t_table;

    -Code to fill the values of v_table here.

    SELECT ID, NO, COLLECT in BULK IN < some other table variabes here > FROM TABLEA
    WHERE ID IN (i) v_table USER.USER;

    I want to know how to use the Type of Oracle Table values in the Select statement.

    Something like this:

    create or replace type t_record as  object (
    id number,
    no number
    )
    /
    
    CREATE or replace type t_table AS TABLE OF t_record;
    /
    
    set serveroutput on
    declare
    
      v_table t_table := t_table();
      v_t1 t_table := t_table();
    
    begin
    
      v_table.extend(1);
      v_table(1).ID := 1;
      v_table(1).No := 10;
    
      v_table.extend(1);
      v_table(2).ID := 2;
      v_table(2).ID := 20;
    
      SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
      from TableA
      FROM TABLEA
      WHERE ID IN (select t.ID from table(v_Table) t);
    
      for i in 1..v_t1.count loop
        dbms_output.put_line(v_t1(i).ID);
        dbms_output.put_line(v_t1(i).No);
      end loop;
    end;
    /
    

    No test!

    P;

    Published by: bluefrog on March 5, 2010 17:08

  • mixture of column type in the select statement

    Oracle 11g r2.

    tab_test (name varchar2, blob... photo)

    (1) select general use *.

    Stored procedure: open ref_cursor to some * of table_test...

    Coast of java: call.registerOutParameter (1, OracleTypes.CURSOR);  Call.Execute ();

    It works very well.

    (2) enter the name of the column in the select such as

    Stored procedure: open ref_cursor to select name, photo table_test...

    Coast of java: call.registerOutParameter (1, OracleTypes.CURSOR);  Call.Execute ();

    ERROR: java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent data types: expected - got BLOB

    My question, if I specify the column names in the select statement, including the varchar2 and blob, how can I registerOutParameter (1, OracleTypes.CURSOR);?

    Thank you

    Scott

    PS The number of returned columns, in real case schenario, is a little, so I prefer to specify column names.

    Wrong forum. This forum is for questions of sql and pl/sql.

    Enter the question ANSWER and the repost in the JDBC forum

    https://community.oracle.com/community/developer/english/java/database_connectivity/java_database_connectivity _(jdbc)

    When repost you provide the necessary information to help you:

    1. information on the full version for Oracle DB

    2 version of the JDK

    3. the name and version of the JDBC jar file

    4. real code that demonstrates the problem

    You should also review the info re REF CURSOR in the JDBC Developer's Guide

    http://docs.Oracle.com/CD/E16655_01/Java.121/e17657/oraint.htm#i1058743

  • I have a LOV custom, but I don't know how to recover the selection?

    Hi all
    I want to recover my lov user selection, but I don't know much about the syntax.
    Please advice.
    Currently, I have attached a script to a button so that I can bring out a LOV.

    ______________________________________________________________


    DECLARE BOOLEAN a_value_chosen;

    BEGIN
    Message ("LOV is gg to pop up.");
    a_value_chosen: = Show_Lov ('LOV27');

    IF this is a_value_chosen
    Message ("you have not selected a value.");
    Bell; RAISE Form_Trigger_Failure;
    ON THE OTHER
    / * I don't know how to recover the selection of the user here... * /.
    Message ("you selected a value!' |") SELECTION);

    END IF;
    END;

    There is another way to get your selection of LOV... you can not use this concept...
    You must return value LOV to some parameter/item, while creating LOV. in order to check if its recoveries or not...

    Suppose that you have returned the value to a parameter named RETURN_VAL then...

    DECLARE
      A_VALUE_CHOSEN BOOLEAN;
    BEGIN
      MESSAGE('LOV IS GG TO POP UP.');
      A_VALUE_CHOSEN := SHOW_LOV('LOV27');
    
    IF :PARAMETER.RETURN_VAL IS NOT NULL THEN
      MESSAGE('YOU HAVE NOT SELECTED A VALUE.');
      BELL; RAISE FORM_TRIGGER_FAILURE;
    ELSE
      MESSAGE('YOU HAVE SELECTED A VALUE!!!' || :PARAMETER.RETURN_VAL);
    END IF;
    END;
    

    -Aamir Arif

  • How to get the 'selection' illuminated

    I have a vista 64. I had a few printing problem which I found out wasa because google chrom. I had one tech outside and the problem has been corrected. However, I have an impression left of problem that I hope someone can help me with. I'm trying to print part of a page. I am the part children and then go to the print page. However, I cannot print print the part because the only 'all' and 'pages' are turned on. "selection is not lit, so I can't click. Can someone tell me how to recover the 'selection '.

    Hey, Dolores,.

    Your computer is configured to display pages in full screen? When this happens press F11 on your keyboard and see if the button reduce reappears.

  • How to get the selected row in a programmatic table of the ADF (table generated from a bean)

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    How to get the selected line in a programmatic (using a SortableModel custom not a display object) ADF table (generated from a bean)?


    We are trying to get the selected row in a bean of a programmatic ADF table to retrieve data based on the selected line.


    Any idea?

    Well, you can use selectionListener to set the selected line to a variable of bean (but this bean must be in extended view or some superiors)

    Something like this: http://www.awasthiashish.com/2015/07/get-selected-row-singlemultiple-from.html

    Dario

  • How to use the selection tool to resize a text box? Before I was able to click on the text box with the selection too in order to resize, but now I click on it and it only gives me 'path' or 'anchor' options.

    How to use the selection tool to resize a text box? Before I was able to click on the text box with the selection too in order to resize, but now I click on it and it only gives me 'path' or 'anchor' options.

    Ashley,

    What about window > show the rectangle enclosing (Ctrl / Cmd + Shift + B to toggle)?

  • DVT:pivotFilterBar - how to get the selected values of the filter

    Hi all

    I have a question: how to get the selected values from the pivot table filter bar programmatically?

    I tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
    but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.

    Environment: JDev 11.1.1.3.0 without tasks.

    Thank you
    Miroslaw

    Hello

    You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:

    Download the template of the bar pivot filter instance
    QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();

    retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
    List criterionList = conjunctionCriterion.getCriterionList ();
    for (int i = 0; i)<_criterionList.size(); i++)="">
    AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion.

    _selected is the currently selected value
    Selected object = criterion.getValues () .get (0);

    System.out.println (_selected);
    }

    Hope that helps,
    Chadwick

  • How to write the select query for it

    Hello

    I had an html form and the area I drop down and he needs to select several values in the drop-down box. When I select multiple values then I have to write the query to SQL select statement.

    When I try to write the select statement and trying to run I get the error message.

    Select * from Table

    where emo_no = '1,2,3 '.

    That's how I write the query please suggest me how to write the query to select several values in the drop-down box.

    Thank you

    Use the keyword sql 'in '.  If you don't know how, I've heard good things about the book Teach Yourself SQL in 10 Minutes by Ben Forta.

  • How to retrieve the selected values of the selectOrderShuttle using ADF 11 g

    Hello world

    Did anyone has idea how to retrieve the selected items by using the shuttle and the order of the elements by using the 'SelectOrderShuttle '?

    Thank you

    valuechangeevent of the shuttle would fire when you shuttle points back.

        public void selectOrderShuttle1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
    
            ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
    
            if (list != null){
                for (int i=0; i
    

Maybe you are looking for

  • Want 700-092d: how to change the order of boot SATA on HP Envy 700?

    I have received warnings that my first HARD drive (SATA0 - 1 TB) is a failure.  I have a second HARD drive (SATA1 - 2 TB) up and running which I've used for the backup.  He had a lot of free space, so I partitioned and downloaded and installed a new

  • CPU does not start. No beeps.

    I have a Compaq Presario SR1729NX. It's mostly stock except for the memory and video update. I noticed a week or two ago she turned slowly. When I went it reboot, all the lights were flashing as they do normally, but the fan just spun and 'polyuretha

  • Graficar analogicas tickets

    Holaaa everyone I need to su ayuda, yo not to esto mucho, uso una DAQ 6009 quiero saber como puedo varios sensores for example UN lm35 connect y UN sensor humedad, el cual similar intensification as el lm35 con salida en voltaje y ver sus Gráficas. N

  • Walkman App Stopped working after update - how to fix?

    After that I did Release6b update on my Xperia Tablet S, SGPT123US/S, the Walkman App has stopped working and I can't figure out how to fix it. I just get a dialog box that says that "Unfortunately, the Walkman has stopped" with a button 'OK' wheneve

  • I'm stuck on Windows XP Service Pack 2. I can't update XP

    I'm stuck on Windows XP SP2 after reinstalling after a failure or replacement of disc. I have validated and reloaded SP2 of Microsoft supplied CD and update of IE ver 6 to ver 8. But I get the following message appears when you try to upgrade to SP3