ORA-00904 ROW_NUMBER, problem with ORDER BY id

Hello world

I use Oracle 9i, I use ROW_NUMBER and I got the ORA-00904 because of the ORDER BY identifier.
SELECT      * 
FROM      (SELECT c.id_comp, 
          c.nom, 
          c.id_type_comp, 
          c.libelle, 
          c.standard, 
          c.id_comp_std, 
          c.id_comp_grp, 
          (SELECT      t.nom 
          FROM      type_composant t 
          WHERE      t.id_type_comp=c.id_type_comp ) 
          AS      nom_type_comp , 
          (SELECT t.libelle 
          FROM      type_composant t 
          WHERE      t.id_type_comp=c.id_type_comp ) 
          AS      libelletype, 
          (SELECT cc.nom 
          FROM      composant cc 
          WHERE      cc.id_comp=c.id_comp_std ) 
          AS      nom_comp_std, 
          (SELECT ccc.nom 
          FROM      composant ccc 
          WHERE      ccc.id_comp=c.id_comp_grp ) 
          AS      nom_comp_grp, 
          ROW_NUMBER() OVER (ORDER BY nom_type_comp) R 
     FROM composant c) 
WHERE      nom LIKE '%' 
AND      R BETWEEN 0 and 200 
ORDER BY nom_type_comp;
And here is the error:
 ROW_NUMBER() OVER (ORDER BY nom_type_comp) R FROM composant c)
                                    *
ERROR at line 25:
ORA-00904: "NOM_TYPE_COMP": invalid identifier
Apparently, it takes the pseudonym I use. I tried with the query instead of the alias, and it worked. Is there a way to do it with the alias because I would use a variable with my ORDER BY.

Any help would be nice!

Andalusians

Published by: Guich may 12, 2011 10:40

You may not use an alias defined on the same query plan.
The alias must be from a subquery.
Such as:

SELECT      *
FROM      (select my_table.*, ROW_NUMBER() OVER (ORDER BY nom_type_comp) R
         from  (SELECT c.id_comp,
                 c.nom,
                 c.id_type_comp,
                 c.libelle,
                 c.standard,
                 c.id_comp_std,
                 c.id_comp_grp,
                 (SELECT      t.nom
                 FROM      type_composant t
                 WHERE      t.id_type_comp=c.id_type_comp ) AS      nom_type_comp ,
                 (SELECT t.libelle
                 FROM      type_composant t
                 WHERE      t.id_type_comp=c.id_type_comp ) AS      libelletype,
                 (SELECT cc.nom
                 FROM      composant cc
                 WHERE      cc.id_comp=c.id_comp_std ) AS      nom_comp_std,
                 (SELECT ccc.nom
                 FROM      composant ccc
                 WHERE      ccc.id_comp=c.id_comp_grp ) AS      nom_comp_grp
            FROM composant c) my_table)
WHERE      nom LIKE '%'
AND      R BETWEEN 0 and 200
ORDER BY nom_type_comp;

Nicolas.

Tags: Database

Similar Questions

  • Problem with order by clause

    Hai all,

    I have problem with order by clause,

    My query is

    "Select number from table1 order number CSA.

    and the output as

    1
    10
    12
    13
    15
    17
    19
    2
    20
    21
    22
    .
    ........

    But if we give the order that it should display below the only good?

    1
    2
    10
    12
    13
    15
    17
    19
    20
    21
    22 ........

    Help me please why it is not displayed as she. and how to make the statement to display as in the second case. Thanks in advance.

    Kind regards
    Uraja

    In your table, the column is VARCHAR2 data type.

    It is a string, even if it is to store numeric values, it will get condemn as strings

    Try the below

    select your_column from table1 order by to_number(your_column) asc 
    

    Published by: JAC on November 19, 2012 16:35

  • Problem with order submit data record for Reporting ATG

    Hi, r. j. Nunes

    I am facing problems with the connection to present newspapers for ATG of the report. The logs for RegistrationFileLogger, SiteVisitFileLogger, UserFileLogger, SegmentFileLogger were successfully getting generated but unable to see the logs for OrderFileLogger during shipment of the order.

    I understand that the/atg/reporting/datacollection/trade/SubmitOrderEventListener of the listener must be notified so that the listeners of corresponding data is called in the order:

    SubmitOrderEventListener-> OrderLogEntryQueueSink-> OrderLogEntryGenerator-> OrderFileLogger

    and newspapers would be written.

    But I'm not able to determine which component notifies the SubmitOrderEventListener by submitting an order.


    Is - this SendFulfillmentMessage component? But SendFulfillmentMessage sends the message to the localdms topic: / local/realization/LocalSubmitOrder on the port of OrderSubmitPort which as component SubmitOrderEventListener listen the subject localdms: / local/realization/LocalSubmitOrder on the DEFAULT port?


    Could someone please clarify.

    Thank you

    Saud

    Hello

    Pipelinelink = "sendFulfillmentMessage" name has been commented to our commercepipeline.xml that we did not use OOTB Presse. Once I removed the comment, sent messages and newspapers to submit order got generated.

    Thank you

    Saud

  • Problem with order?

    I had some problems with a po recipes.
    I create a purchase order, but I can´t see it in some organizations. the ship of the organization is the main element of the organization.

    Sorry, I'm not a functional person so I can't offer much help.

    You have consulted the documentation? -http://docs.oracle.com/cd/B53825_08/current/html/doclist.html#Purchasing_p

    If you still have the same problem, then you can save a SR.

    Thank you
    Hussein

  • Problem with Order by

    Hello everyone

    I am an Oracle Developer, and I have a problem with an order by clause.

    I have a column varchar2 with numeric values and alfanumeric
    For example, I have the following values in the column that I applied the order of: 1,2,3, A, B, C

    When I do next
    Select column_ord From my_table Order by ASC column_ord;
    The result is:
    A, B, C, 1, 2, 3

    With the following:
    Select column_ord From my_table Order by column_ord desc;
    The result is:
    3,2,1, C, B, A

    I Don t udestand this result, because I think that the result should be as follows:
    Select column_ord From my_table Order by ASC column_ord;
    The result is:
    1,2,3, A, B, C


    I work with Oralce 10 g ver: 10.2.0.1. and I tried this in Toad and sql * more

    Appreciate the help, greetings
    Miguel att.

    Published by: Miguel Balderas on 30/03/2011-14:04

    Hi Miguel,.

    Check your session nls_sort setting in this selection: SELECT * FROM v$ nls_parameters;

    For your desirable result, try this: ALTER SESSION SET NLS_SORT = "BINARY";

    Santiago González

  • Problem with order of clip

    This is a question and request for suggestions.
    I'm very new to using first Pro CS4 using VideoStudio for a long time. But due to a mutitude of bug and constant crashes, I just let fall on her and made the transition to the first.

    I begin to develop projects of AVCHD clips. My camera creates each scene as a file. With VideoStudio I had to use TSmuxeR to merge them into a single clip, otherwise it would just fall more take hours (literally) to start because she wanted to check each hook. When you have hunderds in a project it is a problem.

    Prime Minister handles this much better doing things in the background, but I had some problems with clips are reordered. Maybe my approach is all wrong and I'm open to suggestions.

    For example, I break the clips in segments that relate to a topic and put in a bin. So, in a project, I would have 700 clips into 10 bins with 50 to 100 clips in each location. And I might have a dozen projects which constitute a 'production '. But when I import clips (IE windows) the last clip always happens to be the first imported. It is a common windows problem which I do not know how to move. In any case, when it gets imported I then rearrange clips. Clips from your device name is a time code date as 20100514082312.mts which is unique and you can order by date very easily, but it is really hard to read.

    The problem that I seem to have if I take a bin (that' it'sbeen sort) and drag it to the timeline, the last clip gets always inserted first. I guess that the Prime Minister is to remember the order that the clips had import and not how I trie in the bins.

    Because I tend to move things around a lot, it is a concern to keep deting first clips and then put on the end of the sequence, etc..

    Is there a way to get around this? As do enforcement in the stick of bins, or order the clips by name in the time line or maybe bring imported in the correct order in the first place?

    Or is the way I'm doing this all wrong. I admit it's hard to give up the way I did things in VideoStudio which could impose some bad habits.

    There is something else you can try - select the media and to automate for the timeline. You can tell it to not add transitions and do not overlap, and there are options to overlay the clips in the order of sorting or the order of selection. Try to select clips in the order of your choice.

    If there is something else in the trash you want, like a sequence, you may need to select all, uncheck what you want and then automate.

  • problem with order 40470 themes from adobe for muse

    Hi, I have a problem with a template I received topic of adobe, nr.40470. the problem is that when I preview the page in the browser, the text is on the right side of the chassis. I deleted and reinstalled the model several times but still the same error

    Hi A and C,

    Try to increase the size of the TextBox for a better analysis and share a link to your site.

    Kind regards

    Akshay

  • Problem with order by Date

    Apex 3.2

    I have a report based on a collection, but the ranking of start_date and end_date does not work.

    Select

    C002 start_date,

    C003 end_date,

    -start_date to_char (to_date (c002, 'dd.mm.yyyy'), 'dd.mm.yyyy'),

    -End_date to_char (to_date (c003, 'dd.mm.yyyy'), 'dd.mm.yyyy'),

    C004 conversion_factor,

    SI.apskey SMI,

    SI.longdescr Description

    to apex_collections, if udm_si

    where si.siid = c001

    and collection_name = "SMI_INSERT_COL."

    I tried

    C002 start_date,

    C003 end_date

    and put exact in the formatting of column

    I tried

    start_date to_char (to_date (c002, 'dd.mm.yyyy'), 'dd.mm.yyyy'),

    -End_date to_char (to_date (c003, 'dd.mm.yyyy'), 'dd.mm.yyyy'),

    with no formatting of column

    I also tried

    start_date to_char ("c002, ' dd.mm.yyyy")

    but I get an error

    error report:

    ORA-01722: invalid number

    Gus

    Some previous threads please refer to "-" the origin of this. Try to split the "-"s: ".

    ' ': apex_item.display_and_save (2, c002)

  • Strange problem with order of cursor on Satellite P100-160

    On my brand new laptop P100-160 with MS Vista Premium, I have an annoying error. Frequently, but without a reason, when I point the cursor on a command and press the touch screen go to the Maximum or to the Minimum size if it's to the Max, but the command is not executed. This happens on all programs, that is to say, words, Excel, games, etc.. I'm away from the United Kingdom and the store where I bought the laptop so resume the shop is not an option.

    Anyone else see this fault or can anyone suggest a solution?

    "It's not a bug, it's a feature!"

    Discover the taskbar when using the touchpad. There is an animated icon beside the clock touchpad. Click twice, and then on the top left device options and on the options again. There, you can spend some time and read about all the flaws of your touchpad - also how you can disable them.

    Have fun.

  • ORA-00904 invalid identifier with the insert command

    Please inform me of what's wrong with insert.




    Declare
    cursor c1 is
    Select column_name as Column_namee, data type data_type, data_length as datalen ALL_TAB_COLUMNS where table_name = upper('ALI');
    temp_col_names varchar2 (1000);

    BEGIN
    for j in loop c1

    temp_col_names: = temp_col_names | j.column_namee | «, » ;

    end loop;
    Select substr (temp_col_names, 0, length (temp_col_names)-1) in the double temp_col_names;

    dbms_output.put_line (temp_col_names);

    INSERT INTO temp_col_names (temp_col_names) SELECT id WHERE Ali ali2 = 4;


    END;

    This means that there is no temp_col_names of the column in the table ALI2. Looks like you are the dynamic SQL search - you want to insert all the table columns ALI in the same set of columns in table ALI2, right? Then use:

    EXECUTE IMMEDIATE ' INSERT INTO ali2 (' | temp_col_names |) ') SELECT ' | temp_col_names | "Ali WHERE id = 4';

    SY.

  • ORA-01092 and problem with include ORACLE :)

    Hello
    I question why I have error ORA-01092 wne I want to create the database? Files, scripts and P:

    CREATE DATABASE ORCL
    The USER SYS IDENTIFIED BY pz6r58
    The USER IDENTIFIED BY y1tz5p SYSTEM
    LOGFILE GROUP 1 ("C:\oracle\product\10.2.0\oradata\orcl\redo01.log") SIZE 100 M,
    GROUP 2 ("C:\oracle\product\10.2.0\oradata\orcl\redo02.log") SIZE 100 M
    GROUP 3 ("C:\oracle\product\10.2.0\oradata\orcl\redo03.log") SIZE 100M
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 100
    MAXINSTANCES 1
    CHARACTER SET US7ASCII
    NATIONAL CHARACTER SET AL16UTF16
    DATAFILE 'C:\oracle\product\10.2.0\oradata\orcl\system01.dbf' SIZE 325M REUSE
    LOCAL MANAGEMENT MEASURE
    SYSAUX DATAFILE 'C:\oracle\product\10.2.0\oradata\orcl\sysaux01.dbf' SIZE 325M REUSE
    TABLESPACE tbs_1 default
    TEMPORARY TABLESPACE tempts1 default
    TEMPFILE 'C:\oracle\product\10.2.0\oradata\orcl\temp01.dbf '.
    RE-USE OF 100 M OF SIZE
    UNDO TABLESPACE undotbs
    DATAFILE 'C:\oracle\product\10.2.0\oradata\orcl\UNDOTBS1.dbf '.
    SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

    PFILE:
    ORCL.__db_cache_size = 142606336
    ORCL.__java_pool_size = 4194304
    ORCL.__large_pool_size = 4194304
    ORCL.__shared_pool_size = 130023424
    ORCL.__streams_pool_size = 8388608
    *.audit_file_dest='CC:\oracle\product\10.2.0\db_1\admin\ORCL\adump'
    *.background_dump_dest='C:\oracle\product\10.2.0\db_1\admin\ORCL\bdump'
    * full = '10.2.0.1.0'
    *.control_files='C:\oracle\product\10.2.0\oradata\orcl\control01.ctl','C:\oracle\product\10.2.0\oradata\orcl\control02.ctl','C:\oracle\product\10.2.0\oradata\orcl\control03.CTL '
    *.core_dump_dest='C:\oracle\product\10.2.0\db_1\admin\ORCL\adump'
    * .db_block_size = 8192
    * .db_domain = "
    * .db_file_multiblock_read_count = 16
    * .db_name = "orcl".
    *.db_recovery_file_dest='C:\oracle\product\10.2.0\flash_recovery_area'
    * .db_recovery_file_dest_size = 2147483648
    *. Dispatchers ='(Protocol=TCP) (SERVICE = orclXDB)"
    * .job_queue_processes = 10
    * .open_cursors = 300
    * .pga_aggregate_target = 96468992
    * runoff = 150
    * .remote_login_passwordfile = "EXCLUSIVE."
    * .resource_manager_plan = "DED".
    * .sga_target = 290455552
    * .undo_management = "AUTO".
    * .undo_tablespace = "UNDOTBS1.
    *.user_dump_dest='C:\oracle\product\10.2.0\db_1\admin\ORCL\udump'

    Thanks for the reply.
    Andrew

    Remove "DEFAULT TABLESPACE Tbs_1" of your script, create your database and create this tablespace later. Make default later if necessary.

    Nicolas.

  • Problem with DESC ordering for the resolution of conflicts

    I am trying to create a composite event with semantic alias set and table. I created a simplified below example to show the problem that I get. I have assessments that are entered into a table, and whenever a new is an elder at the same address, the composite event should fire. But, if there is more than two for the same address, I want only to raise the event for the most recent prior assessment. I know that this is not yet a complete solution I have to find a way to expire old events after they are used for the composite event, but I can't get beyond the error I get. CREATE_RULE_CLASS gives me the following error:

    Error on line 1
    ORA-41621: error in ordering the property:
    ORA-00904: "RLM$ EVENT. "" RLM OBCOL_0DESC$ ": invalid identifier
    ORA-06512: at "EXFSYS. DBMS_RLMGR', line 709
    ORA-06512: at line 2

    Looks like he's trying to treat my "DESC" designation under another name of the column to order by. Oracle 11g Enterprise 11.1.0.7.0. Here is my script:

    CREATE TABLE APPRAISALTEST
    (
    APPRAISAL_ID NUMBER (20) NOT NULL,
    ADDRESS_ID NUMBER (20).
    DATE OF APPRAISAL_DATE,
    NUMBER VALUE (10)
    );

    CREATE A UNIQUE APPRAISALTEST_PK ON APPRAISALTEST INDEX
    (APPRAISAL_ID);


    Start
    DBMS_RLMGR. CREATE_EVENT_STRUCT (data = > 'AppraisalPair');

    DBMS_RLMGR. () ADD_ELEMENTARY_ATTRIBUTE
    Event_Struct = > 'AppraisalPair ',.
    attr_name = > "appr1"
    tab_alias = > RLM$ TABLE_ALIAS ('APPRAISALTEST'));

    DBMS_RLMGR. () ADD_ELEMENTARY_ATTRIBUTE
    Event_Struct = > 'AppraisalPair ',.
    attr_name = > "appr2"
    tab_alias = > RLM$ TABLE_ALIAS ('APPRAISALTEST'));
    end;

    BEGIN
    DBMS_RLMGR. () CREATE_RULE_CLASS
    rule_class = > 'AppraisalPairRC ',.
    Event_Struct = > 'AppraisalPair ',.
    action_cbk = > 'AppraisalPairCBK ',.
    actprf_spec = > ' EVENT_TYPE VARCHAR2 (20), EVENT_PARAM VARCHAR2 (20),
    rslt_viewnm = > 'NewAppraisalPairs ',.
    rlcls_prop = > ' < composite equal = 'appr1. ADDRESS_ID, appr2. ADDRESS_ID"' |
    ' consumption = command 'shared' = 'appr1. ' APPRAISAL_DATE DESC' cnfevents = 'I' / > ");"
    END;

    SET DEFINE OFF
    insert into AppraisalPairRC (rlm$ ruleid, score_component_type, score_value, rulecond$ rlm)
    values ('Rule1', 'ABC', 'DEF',
    ' < condition >
    < and join = "Appr2.APPRAISAL_DATE & gt; Appr1.APPRAISAL_DATE and Appr2.VALUE & gt; Appr1.value">
    < name of the object = "Appr1" / >
    < name of the object = "Appr2" / >
    < / and >
    (< / condition > ');

    Hello

    You came across a bug that has been fixed in the latest version. You can work around this problem by changing the command clause as follows.

    SQL> BEGIN
      2            DBMS_RLMGR.CREATE_RULE_CLASS (
      3            rule_class => 'AppraisalPairRC',
      4            event_struct => 'AppraisalPair',
      5            action_cbk => 'AppraisalPairCBK',
      6            actprf_spec => 'EVENT_TYPE VARCHAR2(20), EVENT_PARAM VARCHAR2(20)',
      7            rslt_viewnm => 'NewAppraisalPairs',
      8            rlcls_prop => '');
     10  END;
     11  /
    

    Hope this helps,
    -Aravind.

  • With the help of the ORA-00904 granted by ROLE

    Hi all

    I have an error using the grant through ROLE (Oracle 11.2.0.1 on redhat Linux)

    Here is the explanation of my problem:

    I create a package to wear patterns

    create or replace 
    PACKAGE                     usera.pkg_utils AS 
     function f_my_function return RAW;
    END pkg_utils;
    

    I create the package body:

    create or replace 
    PACKAGE BODY usera.pkg_utils  AS 
     function f_my_function return RAW  is
      v_uuid RAW(16);
    begin
      v_uuid := sys.dbms_crypto.randombytes(16);
      return (utl_raw.overlay(utl_raw.bit_or(utl_raw.bit_and(utl_raw.substr(v_uuid, 7, 1), '0F'), '40'), v_uuid, 7));
    end f_random_uuid;
    END pkg_utils;
    

    I create a 'R_ROLE1' role to which I admit "EXECUTE ON USERA. PKG_UTILS TO R_ROLE1.

    I give you that R_ROLE1 to the PUBLIC so that each user can access the package USERA. PKG_UTIS

    If I call another user f_my_function, it works well.

    If I call another user from a procedure f_my_function I get "ORA-00904".

    ex: to UserB

    create or replace 
    PROCEDURE P_PROC
    AS
    num int;
    uuid_ RAW(16);
    BEGIN
        select usera.pkg_utils.f_my_function() into uuid_ from dual;
    END P_PROC;
    /
    

    If I give you that directly "GRANT EXECUTE ON USERA. PKG_UTILS TO PUBLIC' so it works well.

    Thus, the error comes from the fact that I use a role, but I can't fix it. I don't understand why USERB does not use its grant to the role of r_role1 granted to PUBLIC.

    Is there something as USERB is unusable cascade role during the call to a procedure? is there something to "activate"? ".

    Thank you all

    See the doc database security for your answer and the explanation of what others have said.

    http://docs.Oracle.com/CD/B28359_01/network.111/B28531/authorization.htm#i1007304

    Operation of the roles in PL/SQL blocks

    The use of roles in a PL/SQL block depends on if it is an anonymous block, or a block named (stored procedure, function, or trigger), and if it runs with the rights of the author or the rights of the applicant.

    Roles used in the appointed with rights to define blocks

    All roles are disabled in any PL/SQL block named (stored procedure, function, or trigger) that runs with the rights of the author. Roles are not used to privilege control, and you cannot define roles within the procedure of a DEFINER rights.

    The SESSION_ROLES view shows all roles that are currently enabled. If a named PL/SQL block that runs with Definer Rights queries SESSION_ROLES , then the query will return no rows.

  • Update fails with ORA-00904 invalid identifier

    Hi all
    I have problems of construction of an ' update '. Execute the following select statement,
    SELECT 
     XREF.REGN_ID,
           XREF.COUNTY_NM,
           OWNER.CASE_OWNER_ID,
           OWNER.FORMER_AREA,
           OWNER.AREA,
           OWNER.COUNTY_NUMBER,
           OWNER.OFFICE
      FROM PS2_CASE_OWNER_SEYED OWNER,
           DWFSSD.TAFS_REGN_AREA_XREF_MART XREF
              WHERE    (OWNER.AREA = XREF.AREA_ID(+))
                 AND (OWNER.OFFICE = XREF.OFFICE_CD(+) )
                 AND (OWNER.COUNTY_NUMBER = XREF.COUNTY_NUM(+))
    Returns
    REGN_ID   COUNTY_NM                        CASE_OWNER_ID   FORMER_AREA   AREA   COUNTY_NUMBER   OFFICE   
    "1"       "Alfalfa"                        "5008756"       "1"           "1"    "02"            "C"      
    "1"       "Alfalfa"                        "5008954"       "1"           "1"    "02"            "C"      
    "1"       "Beckham"                        "5008803"       "1"           "1"    "05"            "C"      
    "1"       "Beckham"                        "5008222"       "1"           "1"    "05"            "C"      
    "1"       "Beckham"                        "5008223"       "1"           "1"    "05"            "C"      
    "1"       "Beckham"                        "5008424"       "1"           "1"    "05"            "C"      
    "1"       "Beckham"                        "5008442"       "1"           "1"    "05"            "C"      
    "1"       "Beckham"                        "5008780"       "1"           "1"    "05"            "C"      
    "1"       "Beckham"                        "5008787"       "1"           "1"    "05"            "C"      
    "1"       "Beckham"                        "5008788"       "1"           "1"    "05"            "C" 
    I am trying to execute the following statement, "Update", update the PS2_CASE_OWNER_SEYED table.
    UPDATE (
      SELECT OWNER.AREA, XREF.REGN_ID, XREF.COUNTY_NM
      FROM PS2_CASE_OWNER_SEYED OWNER, DWFSSD.TAFS_REGN_AREA_XREF_MART XREF
       WHERE    (OWNER.AREA = XREF.AREA_ID(+))
         AND (OWNER.OFFICE = XREF.OFFICE_CD(+) )
         AND (OWNER.COUNTY_NUMBER = XREF.COUNTY_NUM(+))
    )
    SET OWNER.FORMER_AREA = OWNER.AREA,
        OWNER.AREA = XREF.REGN_ID,
        OWNER.COUNTY_NAME = XREF.COUNTY_NM;
    The "Update" statement returns the following error:
    ORA-00904: "XREF"."COUNTY_NM": invalid identifier
    Any ideas what's wrong with the update statement?

    Thank you

    Seyed

    Hi, Seyed,

    Here's a way to do this UPDATE:

    UPDATE     emp
    SET     sal     = sal * 1.05
    ,     comm     = NVL (comm, 0) + 500
    WHERE     deptno     IN (
                   SELECT     deptno
                   FROM     dept
                   WHERE     loc     = 'DALLAS'
                 )
    ;
    

    If you want to use an inline view, you can do this:

    UPDATE     (
              SELECT     e.sal
              ,     e.comm
              FROM     emp     e
              JOIN     dept     d  ON     d.deptno  = e.deptno
              WHERE     d.loc     = 'DALLAS'
         )
    SET     sal     = sal * 1.05
    ,     comm     = NVL (comm, 0) + 500
    ;
    

    Whatever it is, the emp table is left as you wish:

    EMPNO ENAME  JOB         MGR HIREDATE          SAL  COMM DEPTNO
    ----- ------ --------- ----- ---------- ---------- ----- ------
     7782 CLARK  MANAGER    7839 06/09/1981       2450           10
     7839 KING   PRESIDENT       11/17/1981       5000           10
     7934 MILLER CLERK      7782 01/23/1982       1300           10
     7876 ADAMS  CLERK      7788 05/23/1987       1155   500     20
     7902 FORD   ANALYST    7566 12/03/1981       3150   500     20
     7566 JONES  MANAGER    7839 04/02/1981    3123.75   500     20
     7788 SCOTT  ANALYST    7566 04/19/1987       3150   500     20
     7369 SMITH  CLERK      7902 12/17/1980        840   500     20
     7499 ALLEN  SALESMAN   7698 02/20/1981       1600   300     30
     7698 BLAKE  MANAGER    7839 05/01/1981       2850           30
     7900 JAMES  CLERK      7698 12/03/1981        950           30
     7654 MARTIN SALESMAN   7698 09/28/1981       1250  1400     30
     7844 TURNER SALESMAN   7698 09/08/1981       1500     0     30
     7521 WARD   SALESMAN   7698 02/22/1981       1250   500     30
    
  • ORA-00904 on CREATE TABLE with a virtual column based on the XMLTYPE content

    Hello

    This is another one for the gurus of the syntax...

    Try the following, fails with ORA-00904: "MESSAGE". "' GETROOTELEMENT": invalid identifier
    CREATE TABLE XML_TEST_VIRT
      (
       MSG_TYPE         GENERATED ALWAYS AS (MESSAGE.GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
      )
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /
    While it succeeds
    CREATE TABLE XML_TEST_VIRT
      (
       MSG_TYPE         GENERATED ALWAYS AS (EXTRACT(MESSAGE, '/*').GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
      )
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /
    The GETROOTELEMENT from SYS member function. XMLTYPE is stated as "PARALLEL_ENABLE DETERMINISTIC" the method called is not the problem, as evidenced by the 2nd case.
    Using the MESSAGE column that is of type XMLTYPE directly seems to be the problem. But the question is "why." The result of the EXTRACT function is of type XMLTYPE and call his works of members, the column is also of type XMLTYPE still call its members fails...

    Thanks in advance for any ideas on that.

    Best regards
    Philippe

    Going on the means to go far, far back.

    2003 re: function getRootElement ORA-00904

Maybe you are looking for

  • No option for the email address for the import

    I import the list of 'people' to outlook.com in a csv file. When I get the choice to realign the fields of address book to import data record, there is no option for 'email address' in the record to bind to data. Everything what is important is the n

  • iOS 9.2.1 RSS does not work in the area of the Ireland

    Hi, the news feed seems to have stopped working on iOS 9.2.1 on iPhones? Just checked another phone on the same network and a similar problem. In the media was ppreviously work even if he wasn't a news icon. changed the region UK & US then icon appea

  • Impossible to find os2ldr at startup

    When the system has restarted after Microsoft upgrades last night, the system does not start without operating system recovery CD.  Message: Can't find OS2LDR

  • delete activity internet defender

    I have Windows XP Professional and you want to remove the defender of the Internet activate. Pleqase help. E-mail address is removed from the privacy *.

  • Compaq Presario CQ56: Locked BIOS

    I forgot my BIOS password. After several trys, I get the 57790674 number. Can you help me?