Creation of a where clause clause in the LOV query box

Hi guys is any able to help me with this one

I have a page in my application where there down LOV down now values this menu drop-down comes from a table that looks like this

users_for _form_TBL

E_MAIL Name of the vendor
[email protected]Oracle
[email protected]SAP
[email protected]IBM
[email protected]Oracle
[email protected]Intergraph

So my syntax for the LOV I mentioned looks like this

Select PROVIDER as display_value, SELLER as return_value

of form_user_tab where email =: APP_USER

order by 1;


so if [email protected] connects to the application and to make a selection on the LOV it would only show suppliers compared to his E_MAIL like oracle, sap, IBM , and then he clicks the submit button on the page then the seller that he chose is inserted into another table. What I did on the table of insertion has been to create a trigger that after inserting a seller the trigger inserts a 1 in a column called assessed.

What I did after that is add a select statement in the where clause of the LOV so that she would check in the table insert if this seller had been chosen before and not show them again to be selected my syntax, the second time around in the SQL query box has been

Select PROVIDER as display_value, SELLER as return_value

to users_for _form_TBL where email =: APP_USER

and (select "seller", "ASSESSD' of _tbl inserted is null);

order by 1;

But im getting an error of ideas guys. Thank you

rhisingh wrote:

hay man thanks for your response really using the syntax is

Select PROVIDER as display_value, SELLER as return_value

to users_for _form_TBL where email =: APP_USER

and (select provider, ESTIMATED from _tbl of nserted where there is no "seller", "RATED")

order by 1;

im still get and error is the where the clause allowed in the second select statement

He still has basic syntax errors. You posted 4 different "table names" whose only in the first query is valid so far. That can not see your database, I don't know what really is the name of these tables, and to what extent these is wrong helps your problem.

I can tell that you are looking for:

select
    u.vendor display_value
  , u.vendor return_value
from
    users_for_form_tbl u
where
    u.e_mail = :app_user
and not exists (select null from inserted_tbl_imp i where u.vendor = i.vendor)
order by
    u.vendor

but the table names could be something else...

Tags: Database

Similar Questions

  • Can I use truncated and where clause in the statement even?

    Hello guys,.

    Can I use truncated with where clause in the same statement.


    For ex:

    TRUNCATE TABLE my_table WHERE id < 500;

    If not, that you recommend me to overtemperature to the level of high water line?


    By the way
    select * from v$version;
    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE 11.2.0.1.0 Production."
    AMT for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    >

    Thank you very much.

    Published by: 970992 on 11:14 13.Ara.2012

    >
    Okay I need an increasing amount of space. However, at the same time I want to recover the spaces empty below HWM. So, I need to use less amount of space I am inserting. Therefore, shouldn't use retractable for this?
    >
    Why waste the effort. Oracle will reuse the space below the HWM when doing inserts. You already said that you insert more lines you delete so all these will be more accustomed to the top.

    The only time where that oracle may not use space is when the space is too small to be useful. It is documented in the doc, I told you
    >
    Understanding recoverable unused space
    Over time, Update, and Delete on objects within a tablespace can create pockets of empty space that individually are not large enough to be reused for the new data.
    >
    Most uses of CONTRACTION I've seen are totally useless. If you follow the doc and run the Advisor of segment it will tell you if there is space that can be retrieved and how much. But, even once, for your use even if case will get you will Oracle while you need to reassign the new extensions, then the HWM will just go still higher.

    If pay you a heavy price in Oracle did a full table scan, update of many blocks from the table, update THE index, impact performance for other users to access the table during the SHRINK and reallocate extensions (maybe even some of the same areas) when you insert more data.

    Do not SHRINK unless you know it's necessary.

  • Session variable in the WHERE clause of the SQL statement

    Hey all,.

    I was wonering just if there is a way to set the WHERE clause of the query that the session variable?  I have the following so far and have tried to go through a ton of tutorials, but it doesn't seem to work.  Is it still possible?  I don't know what follows is wrong, but can someone help me with changing the following code, or pointing me to a good tutorial?  (I write it with PHP)

    $query = "SELECT * from members where user_id = ' $_SESSION ['members']";

    Thanks for your help.

    $member = "-1";
    If (isset($_SESSION['members'])) {}
    $member = $_SESSION ['members'];

    }
    $query = "SELECT * from members where user_id = $member;

  • How to define a WHERE clause of the subquery in a bean managed?

    Hi people,

    is it possible to define the place where clause of a subquery in a bean managed?
    For example, it is more SQL charly:

    SELECT * FROM
    (SELECT Person.Name
    OF the person)

    To change or add a WHERE clause, I use following code for the 'viewObject: view

    String whereClause = "ROWNUM < =: numberOfRows;
    viewObject.setWhereClause (whereClause);

    viewObject.defineNamedWhereClauseParam ("numberOfRows", null, null);
    viewObject.setNamedWhereClauseParam ("numberOfRows", new Number (100));

    AttributeList myattr = this.getNamedWhereClauseParams ();
    viewObject.setNamedWhereClauseParams (myattr);

    For example, this code works well for the first SELECT statement limit the output to the first 100 results. But how do I add a WHERE clause of the subquery in a managed bean? For example, when I want to limit the names of people that begin with the letter "A"?
    The query should look like this:

    SELECT * FROM
    (SELECT Person.Name
    OF the person
    WHERE Person.Name LIKE 'A %')

    Anyone know more?

    Thank you!

    Put a variable binding in your query, something like:

    where (: bv is null) or (xxx love: bv)

    John

  • Where clause in the "default_where" of get_block_property is not cancelled...

    Hello

    I developed a form with two blocks.

    The first - block of non - database contains the criteria.

    Database of the other - block-displays the records according to the inserted.

    Also, there is a button that executes the query criteria.

    The code of the BUTTON WHEN PRESSED is as follows:

    declare

    v_where varchar2 (3000);

    Start

    v_where: = null;

    go_block ('EKKREMOTHTES_AIT_TSG');

    clear_block (no_validate);

    v_where: = get_block_property ('EKKREMOTHTES_AIT_TSG', default_where);

    If: blk_criteria.site_id is not null then

    v_where: = v_where |' and site_id = "'|: blk_criteria.site_id | ''';

    end if;

    If: blk_criteria.yphr_klimakio is not null then

    v_where: = v_where |' and yphr_klimakio = "'|: blk_criteria.yphr_klimakio | ''';

    end if;

    If: blk_criteria.send_date_from is not null and: blk_criteria.send_date_to is not null then

    v_where: = v_where |' and send_date between to_date('''|| to_char(:blk_criteria.send_date_from,'dd/mm/yyyy')||''',''dd/mm/yyyy'') and

    to_date('''|| to_char(:blk_criteria.send_date_to,'dd/mm/yyyy') | " (', "dd/mm/yyyy)";

    end if;

    If: blk_criteria.eq_group1 is not null then

    v_where: = v_where |' and eq_group1 = "' | : blk_criteria.eq_group1 | " ' ;

    end if;

    If: blk_criteria.eq_type1 is not null then

    v_where: = v_where |' and eq_type1 = "' | : blk_criteria.eq_type1 | " ' ;

    end if;

    If: blk_criteria.eq_group2 is not null then

    v_where: = v_where |' and eq_group2 = "' | : blk_criteria.eq_group2 | " ' ;

    end if;

    If: blk_criteria.eq_type2 is not null then

    v_where: = v_where |' and eq_type2 = "' | : blk_criteria.eq_type2 | " ' ;

    end if;

    blk_def_where ('EKKREMOTHTES_AIT_TSG', v_where);                                    / * a form routine that makes the set_block_property(<block>,default_where) * /.

    do_key ('execute_query');

    end;

    The above code works when the user inserts the criteria for the first time. Later when the user deletes certain criteria - clear criteria in the block of criteria-

    and he pushed the button of the query results are exactly the same...

    After have debugged the problem, clause v_where is not nullied (do not get the value zero) in order to get the new criteria.

    Can you identify the error?

    Note: I use Oracle Forms 10 g Db 11 g v.2

    Thank you very much

    SIM

    SIM,

    The procedure "blk_def_where" sets the block where clause by using the DEFAULT_WHERE or the ONETIME_WHERE constanct?  Gets it to the user that the same results as the DEFAULT_WHERE sets the property WHERE permanently so the second time through, the 'v_where' is NOT null.  Check your BLK_DEF_WHERE procedure and if it does not use the ONETIME_WHERE constanct, change isn't.  The alternative would be to put DEFAULT_WHERE = NULL after the call to the built-in EXECUTE_QUERY.

    Craig...

  • Question about the order of evaluation of the clause WHERE CLAUSE when the Oracle OF the syntax used to join tables

    Hello

    Oracle version: 11.1.0.7.0 - 64 bit

    I read the documentation online at joins. The page is avialable here: joins at

    My question is about the join order of evaluation of the conditions in clause and the conditions of those

    are not the join conditions and are placed in the WHERE clause.

    Consider the following pseudocode

    SELECT

    T1. Col1,

    T2.Col1

    Of

    Table1 t1 LEFT OUTER JOIN table2 t2

    WE

    (condition_expression1)

    WHERE

    (condition_expression2)

    Is it correct to say that if there is no column on the status of join (condition_expression1) in condition_expression2, then condition_expression2 is executed before condition_expression1? In other words, oracle always trying to filter based on the WHERE clause individually each table as much as possible before joining them based on the conditions on the article?

    Thanks in advance,

    Hello

    dariyoosh wrote:

    Hello

    Oracle version: 11.1.0.7.0 - 64 bit

    I read the documentation online at joins. The page is avialable here: joins at

    My question is about the join order of evaluation of the conditions in clause and the conditions of those

    are not the join conditions and are placed in the WHERE clause.

    Consider the following pseudocode

    SELECT

    T1. Col1,

    T2.Col1

    Of

    Table1 t1 LEFT OUTER JOIN table2 t2

    WE

    (condition_expression1)

    WHERE

    (condition_expression2)

    Is it correct to say that if there is no column on the status of join (condition_expression1) in condition_expression2, then condition_expression2 is executed before condition_expression1? In other words, oracle always trying to filter based on the WHERE clause individually each table as much as possible before joining them based on the conditions on the article? ...

    The reverse is actually closer to the truth, but we can't really make general statements like that.

    SQL is not a language of the proceedings.  Looking at the code SQL, we could say that the code does, but we cannot say much about how that code it.  In other words, SQL is a language that describes the results you get, not the way to get them.

    The optimizer will do everything what he thinks is faster if it does not change the results.  If any order in which they are applied (in outer joins or CONNECT BY queries, for example), then think of the join is done first, and the value of the WHERE clause is applied to the result of the join.

    Here is a query looks very much like you posted:

    SELECT d.deptno

    e.ename, e.sal

    OF scott.dept d

    LEFT OUTER JOIN scott.emp e ON e.deptno = d.deptno

    WHERE e.sal > = 3000

    ORDER BY d.deptno

    ;

    Output:

    DEPTNO ENAME SAL

    ---------- ---------- ----------

    10 KING 5000

    20 FORD 3000

    20 3000 SCOTT

    The scott.dept table contains deptnos 30 and 40; Why are they not in the result set?  The query behaves as if the outer join is made first (production 15 rows), then the WHERE clause has been applied.  All lines with deptno = 30 had sals down han 3000 and all single line with deptno = 40 was NULL in the sal column, then these lines are excluded (as well as other lines of deptnos 10 and 20), and only 3 lines above are left.

  • Passing the value of the where clause with the page

    Dear friends,

    I have a requirement like when I select a selection list value I should pass this value to sql query where clause without submitting the page

    ex I have a select like: P1_Dept guess I selects the value 10 in this

    then I have a query select * from emp where deptno =: P1_Dept.

    DB. ORACLE 11G

    APEX 4.1.1.00.23

    is this possible? can someone help me please in this topic

    Thanks and greetings

    Vballeda

    Suppose we have the selection list with the name P1_DEPT and query for report

    select * from emp where deptno = :P1_DEPT
    

    We create dynamic Action on the evolution of the P1_DEPT point. We will need two real actions:

    1-> set value action

    Set the Type - > body of the PL/SQL function

    The function of body - > return 1;

    Page item to submit-> P1_DEPT

    Change to delete-> Yes event

    Selecttion Type-> trigger element

    2. action-> Refresh

    Selecttion Type-> region

    Region-> your region of report

  • By using a WHERE clause in the tree APEX

    Hi all -

    I have a hierarchical SQL query that I display as a tree of the APEX.

    Here is my sample application:

    https://Apex.Oracle.com/pls/Apex/f?p=32581:29

    Login: guest

    PW: app_1000

    workspace: leppard

    I try to add a WHERE clause so that only nodes with the lowest-level children are displayed, i.e. something like "WHERE connect_by_isleaf = 0 OR level = 5'"

    The tree of query with where clause works very well in the SQL command window, but when I add the WHERE clause to my tree apex page no longer displays anything. Is this a problem with APEX or y at - it another way to filter my results?

    Thanks in advance for your suggestions,

    John

    Connect occurs in the first place, the where the provision is applied to these results, effectively cutting in the hierarchical structure. Since the apex has build a hierarchical structure of the query, it relies on the virtual level, which is butchered by applying the where clause. It's a miracle that you're not even receive errors because I expect almost an incorrect json array was built. With no top-level from and only level 5 or end nodes, there is no structure to present: the two apex cannot set a correct representation and not jstree neither. In your request, you will see your "root nodes", but it is not representable.

    I don't know why you want to present it in a tree? Levels both connect_by_is_leaf = 5 will give you everything just a list of nodes without any hierarchical structure.

    The best thing to do is to use a subquery to limit first your dataset and then use it for the basic tree query, this way you violate one of these vital columns.

    For example if you want only nodes and their immediate parent, you can opt for something like this (fast on some testdata model):

    with dataset as (
    select node_id, parent_id
       from treedata
      where connect_by_isleaf = 0
    connect by prior node_id = parent_id
      start with parent_id = 0
    ),
    dataset2 as (
    select node_id, parent_id
      from dataset
    union all
    select node_id, null parent_id
      from treedata
    where node_id in (select parent_id from dataset)
    )
    select level, node_id
       from dataset2
    connect by prior node_id = parent_id
      start with parent_id is null
    
  • ADF Faces 11, add where clause to the detail view in the master/detail relationship

    Hello

    I have two display objects only read connected by a link in a relationship master detail.

    They are displayed in a treetable in the form.

    I have a method on the java object impl view master class, I use to add custom where claused based on entries different user and then run the query.

    Works well, master and detail is interview properly.

    But I also want to further filter the detail view (view from destination in the display link). However, as soon as I add whereclause in the detail view against the master
    relationship of detail seems to have disappeared and are no detail record. I also tried to add a view criteria but with the same result.

    Your comments will be appreciated.

    ADF FACES 11g release 1.


    Jan

    You can get the ViewLinkAccessor, then the ViewObject and try to apply the ViewCriteria, followed by executeQuery... what you are already doing.
    Better to paste your code here...

  • Tuning - using the CASE statement in the WHERE clause of the query

    Hi all

    My request has been changed to use a CASE statement in the WHERE clause to examine the data to some columns based on a parameter value. This modified request is made a full table and constantly running scan. Please suggest what can be done to improve its performance:

    Query:
    SELECT LAST_DAY(TRUNC(TO_TIMESTAMP(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))) AS summary_date,
    os.acctnum,
    os.avieworigin_refid,
    COUNT(1) cnt_articleview,
    SUM(NVL(autocompletedterm,0)) cnt_autocompletedterm
    FROM TABLE1 os
    WHERE os.acctnum IS NOT NULL
    AND os.avieworigin_refid IS NOT NULL
    AND os.requestdatetime IS NOT NULL
    AND UPPER(os.success_ind) = 'S'
    
    AND CASE WHEN
    Param_ValueToCheck  = 'FULL' AND get_date_timestamp(os.requestdatetime)  BETWEEN 
    TO_DATE('01-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') AND
    TO_DATE('31-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS')
    THEN 1
    WHEN
    Param_ValueToCheck  = 'INCR' AND os.entry_createddate  BETWEEN 
    TO_DATE('01-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') AND
    TO_DATE('31-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS')
    THEN 1
    END = 1
    AND CASE WHEN
    Param_ValueToCheck  = 'FULL' AND os.entry_CreatedDate BETWEEN 
    TO_DATE('01-APR-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') AND
    TO_DATE('07-JUN-2011 00:00:00','DD-MON-YYYY HH24:MI:SS')
    THEN 1
    WHEN
    Param_ValueToCheck  = 'INCR' THEN 1
    END = 1
    GROUP BY LAST_DAY(TRUNC(TO_TIMESTAMP(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))), os.acctnum,os.avieworigin_refid;
    Description of the table:
    (Number of lines: approx. > amount 600 000 000)
    Name                           Null     Type       
    ------------------------------ -------- ------------
    ARTICLEID                      NOT NULL NUMBER(20) 
    USERKEY                                 NUMBER(10) 
    AVIEWORIGIN_REFID                       VARCHAR2(10)
    SUCCESS_IND                             VARCHAR2(2)
    ENTRY_CREATEDDATE                       DATE       
    CREATED_BY                              VARCHAR2(10)
    FILENUMBER                              NUMBER(10) 
    LINENUMBER                              NUMBER(10) 
    ACCTNUM                                 VARCHAR2(10)
    AUTOCOMPLETEDTERM                       NUMBER(2)  
    REQUESTDATETIME                         VARCHAR2(19)
    Explain Plan
    SQL> select * from table(dbms_xplan.display);
    
    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Plan hash value: 2224314832
    
    ----------------------------------------------------------------------------------------------------------
    | Id  | Operation            | Name              | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    ----------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT     |                   |   590 | 33040 |  2501K  (1)| 08:20:15 |       |       |
    |   1 |  HASH GROUP BY       |                   |   590 | 33040 |  2501K  (1)| 08:20:15 |       |       |
    |   2 |   PARTITION RANGE ALL|                   |   590 | 33040 |  2501K  (1)| 08:20:15 |     1 |1048575|
    |*  3 |    TABLE ACCESS FULL | TABLE1 |   590 | 33040 |  2501K  (1)| 08:20:15 |     1 |1048575|
    ----------------------------------------------------------------------------------------------------------
    
    
    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       3 - filter(UPPER("OS"."SUCCESS_IND")='S' AND CASE  WHEN ('FULL'='FULL' AND
                  "OS"."ENTRY_CREATEDDATE">=TO_DATE(' 2011-04-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "OS"."ENTRY_CREATEDDATE"<=TO_DATE(' 2011-06-07 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) THEN 1 WHEN
                  'FULL'='INCR' THEN 1 END =1 AND "OS"."REQUESTDATETIME" IS NOT NULL AND CASE  WHEN ('FULL'='FULL'
                  AND "ODS"."GET_DATE_TIMESTAMP"("REQUESTDATETIME")>=TO_DATE(' 2011-05-01 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "ODS"."GET_DATE_TIMESTAMP"("REQUESTDATETIME")<=TO_DATE(' 2011-05-31 00:00:00',
                  'syyyy-mm-dd hh24:mi:ss')) THEN 1 WHEN ('FULL'='INCR' AND "OS"."ENTRY_CREATEDDATE">=TO_DATE('
                  2011-05-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "OS"."ENTRY_CREATEDDATE"<=TO_DATE('
    
    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                  2011-05-31 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) THEN 1 END =1 AND "OS"."ACCTNUM" IS NOT NULL AND
                  "OS"."AVIEWORIGIN_REFID" IS NOT NULL)
    Published by: Chaitanya on June 9, 2011 02:44

    Published by: Chaitanya on June 9, 2011 02:47

    When it is executed individually, MERGE LOGIC 1 and LOGIC of MERGE 2 take about ten for a daterange of 30 days data.

    BUT FULL is to get the scores of APR - JUN, INCR becomes partitions for MAY so not both 30 days.
    Are compare us like with like?

  • Setting in the WHERE clause of the query

    Hi all

    I have 2 tables.

    TABLE_A contains 10 million documents.
    TABLE_B contains 100 records.

    I associate myself with these 2 tables

    Here's a.ID left
    SELECT A.*, B.*
    FROM TABLE_A a, TABLE_B b
    WHERE a.ID = b.ID;
    Here's b.ID left
    SELECT A.*, B.*
    FROM TABLE_A a, TABLE_B b
    WHERE b.ID = a.ID;
    My question is what query will give better performance? I thought that, if we put the column in the table with a lower number of lines on the left, then it will be faster than the other.

    In current versions of Oracle, it does not matter in what order you sum-up your predicates in the WHERE clause of a query: they will be optimized/executed in a way even.

  • How to pass a value LOV to where clause of another LOV

    Hello

    I have the two LOV project and activity. When I select a value of project LOV this value project to switch to the 2nd activity LOV where clause. How can I achieve this.

    I tried to use the code in the process CO request by getting the value of project with the command below.

    int v_project = Integer.parseInt ((String) passiveCriteria.get ('Project')); grab the critirea project

    and set this value in the setwhereclauseparams of the VO LOV. But the above command is throwing an exception with the exception of null pointer.

    This approach is correct, or should I use any other method.

    Thank you
    HC

    Below you will find the article interesting

    http://oracleanil.blogspot.com/2010/12/dependent-lov-in-OAF.html

    Thank you
    AJ

  • left outer join and the where clause for the table to the right

    I want to join two tables a and b, where a is a must and b is a result set in option. When I use a left outer join to a to b, I want to achieve:

    1. Select a single column, two columns of b (not the join columns)
    2 - even if theres no friendly on the join column does not return data from one.
    3. If there is a match applies when the criteria on column b (table in option)

    so, how can I avoid no_data_found in this case? When I apply where criteria for b, so it does not return the data from one, which is a must.

    Sounds like a regular outer join to me...

    select a.col1, b.col2, b.col2
    from   tableA a
           left outer join tableB b
           on (a.id = b.id and b.colX = 'X')
    
  • ADF business components: how to apply where Clause to the new lines

    Hello world.
    I develop Web Application from merger under Jdeveloper 11.1.1.0.1.
    I read this post http://blogs.oracle.com/jheadstart/rowmatch/
    And I have a question. How should I configure rowmatch if I instance the same viewobject except 2 2 viewobject defined on the same entity.

    If you use view criteria to make your filtering and scoring mode 'filter' of the Victoria Cross to be "Both" (database and in-memory), then the framework will automatically use your filter to filter the lines again without having to write code or use your own rowMatch object.

  • To generate the sequence in the select clause of the inner query

    Hi all

    Have the table and the data as below,

    I want to generate a sequence number for all the distinct combinations of emp_id and emp_name running

    DROP TABLE emp1.

    CREATE TABLE emp1 (emp_id NUMBER, emp_name VARCHAR2 (100));

    INSERT INTO emp1 VALUES (1, 'Name1');

    INSERT INTO emp1 VALUES (2, 'Name2');

    INSERT INTO emp1 VALUES (1, 'Name3');

    INSERT INTO emp1 VALUES (2, 'Conjoint4');

    COMMIT;

    Output must be same as below:

    EMP_IDEMP_NAMEReference ID
    1Name11000
    1Name11000
    1Name31001
    2Name41002
    2Name21003

    "You cannot invoke CURRVAL and NEXTVAL in the subquery to CREATE."

    "MATERIALIZED VIEW, or a SELECT, UPDATE, or DELETE statement;

    Steve O'Hearn, Guide to preparing Oracle 1Z0-047

    ------

Maybe you are looking for