Tabular with nvl (max (col), 0) + 1

Hi all

I have a table block, I want to generate sequence for the key item numbers primary with nvl (max (col), 0) + 1

I wrote this in a w-n-r-i trigger:

"LAST_RECORD;

SELECT NVL (MAX (ALERT_ID), 0) + 1 ON: EX_ALERT_SETUP. ALERT_ID EX_ALERT_SETUP; "

but when I enter a new record with the cursor, it also gets the '1', body I have not saved the first '1 ',.

How to deal with this situation?

Thank you

ORA-01400 wrote:

Hi all

I have a table block, I want to generate sequence for the key item numbers primary with nvl (max (col), 0) + 1

I wrote this in a w-n-r-i trigger:

"LAST_RECORD;

SELECT NVL (MAX (ALERT_ID), 0) + 1 ON: EX_ALERT_SETUP. ALERT_ID EX_ALERT_SETUP; "

but when I enter a new record with the cursor, it also gets the '1', body I have not saved the first '1 ',.

How to deal with this situation?

Thank you

If it's a bad design, simply change the trigger as before Insert at the block level. Sequences of database is suggested.

Hope this helps

Hamid

Tags: Oracle Development

Similar Questions

  • Select the rows with values max.

    SELECT MOFFER.DELIVERYPURCHASE,
      MOFFER.OFFERSTART,
      MOFFER.OFFEREND,
      MOFFER.RANKING,
      MMTDEMANDBID.BALANCEGROUPPK
    FROM EMTMOFFER MOFFER
    INNER JOIN MMTDEMANDBID ON MOFFER.OFFERID = MMTDEMANDBID.MMTDEMANDBIDPK
    WHERE MOFFER.DELIVERYPURCHASE = 'P'
    AND MOFFER.OFFERSTART        >= '2012-01-18T00:00:00'
    AND MOFFER.OFFEREND          <= '2012-01-19T00:00:00'
    AND MMTDEMANDBID.BALANCEGROUPPK = '10393'
    DELIVERYPURCHASE OFFERSTART          OFFEREND            RANKING                BALANCEGROUPPK         
    ---------------- ------------------- ------------------- ---------------------- ---------------------- 
    *P                2012-01-18T23:00:00 2012-01-19T00:00:00 2                      10393*                  
    P                2012-01-18T23:00:00 2012-01-19T00:00:00 3                      10393                  
    P                2012-01-18T00:00:00 2012-01-18T01:00:00 2                      10393                  
    P                2012-01-18T01:00:00 2012-01-18T02:00:00 2                      10393           
    *P                2012-01-18T02:00:00 2012-01-18T03:00:00 1                      10393*         
    P                2012-01-18T02:00:00 2012-01-18T03:00:00 2                      10393                  
    P                2012-01-18T03:00:00 2012-01-18T04:00:00 2                      10393                  
    P                2012-01-18T04:00:00 2012-01-18T05:00:00 2                      10393                  
    *P                2012-01-18T05:00:00 2012-01-18T06:00:00 1                      10393*
    P                2012-01-18T05:00:00 2012-01-18T06:00:00 2                      10393                  
    P                2012-01-18T06:00:00 2012-01-18T07:00:00 2                      10393                  
    P                2012-01-18T07:00:00 2012-01-18T08:00:00 2                      10393                  
    P                2012-01-18T08:00:00 2012-01-18T09:00:00 2                      10393                  
    P                2012-01-18T09:00:00 2012-01-18T10:00:00 2                      10393                  
    P                2012-01-18T10:00:00 2012-01-18T11:00:00 2                      10393                  
    P                2012-01-18T11:00:00 2012-01-18T12:00:00 2                      10393                  
    P                2012-01-18T12:00:00 2012-01-18T13:00:00 1                      10393                  
    P                2012-01-18T13:00:00 2012-01-18T14:00:00 1                      10393                  
    P                2012-01-18T14:00:00 2012-01-18T15:00:00 1                      10393                  
    P                2012-01-18T15:00:00 2012-01-18T16:00:00 2                      10393                  
    P                2012-01-18T16:00:00 2012-01-18T17:00:00 2                      10393                  
    P                2012-01-18T17:00:00 2012-01-18T18:00:00 2                      10393                  
    P                2012-01-18T18:00:00 2012-01-18T19:00:00 2                      10393                  
    P                2012-01-18T19:00:00 2012-01-18T20:00:00 2                      10393                  
    P                2012-01-18T20:00:00 2012-01-18T21:00:00 2                      10393                  
    P                2012-01-18T21:00:00 2012-01-18T22:00:00 2                      10393                  
    P                2012-01-18T22:00:00 2012-01-18T23:00:00 2                      10393                  
     27 rows selected 
    Help, please. How to select lines with RANKING max, OFFERSTART and OFFEREND if the same.
    Get 24 ranks. One for every hour.

    SELECT MOFFER. DELIVERYPURCHASE,
    MOFFER. OFFERSTART,
    MOFFER. OFFEREND,
    Max (MOFFER. (Rank CLASSIFICATION),
    MMTDEMANDBID. BALANCEGROUPPK
    OF EMTMOFFER MOFFER
    INNER JOIN MMTDEMANDBID ON MOFFER. OFFERID = MMTDEMANDBID. MMTDEMANDBIDPK
    WHERE MOFFER. DELIVERYPURCHASE = 'P '.
    AND MOFFER. OFFERSTART > = ' 2012 - 01-18T 00: 00:00'
    AND MOFFER. OFFEREND<=>
    AND MMTDEMANDBID. BALANCEGROUPPK = '10393'
    Group of MMTDEMANDBID. BALANCEGROUPPK, deliverypurchase, offerstart, offerend

  • Sourcing rule works with min - max?

    Hello

    (1) Will Sourcing rule works with min - max planning? How?

    (2) and how you decide who use elements of planning elements u and wich Min - max, to the point of replenishment of development?

    Published by: 832641 on February 4, 2011 19:35

    (1) Yes, sourcing will work in the same way that it works with other sources such as kanban, etc. of the PSO. You must define the ASL for the rule point and sourcing with the corresponding transfer game.

    (2) according to my understanding logically point re - order is nothing but Min - Max, min, and max equal to Min value of the stock you want to maintain for the item

  • Problem with NVL in Oracle 10 g version 10.2.0.1.0

    Hello

    I am facing a problem with NVL. I have two configurations one with version 10g 10.2.0.1.0, UAT and other with 10.2.0.3.0.
    I defined a function (SQL written below). Both configurations have the same defined function and I'm passing the same value/setting as well. But, I get different results on both configurations.
    Pls let me know the reasons... .to this strange behavior of function, I think it's because of the NVL

    Function
    CREATE OR REPLACE FUNCTION Fn_Dt_Get_amnt (NUMBER of N_EXP_COVERED_AMT,
    V_SRC_SYSTEM_ID varchar2,
    NUMBER OF N_UNDRAWN_AMT_LCY
    NUMBER OF N_EXP_LIMIT_NCY
    NUMBER OF N_CCF_PERCENT
    NUMBER OF N_EXP_AMT_LCY
    p_undrawn_amt varchar2)
    + RETURN VARCHAR2 AS +.

    + UNDRAWN_AMT NUMERIC (22.3). +

    BEGIN


    IF P_UNDRAWN_AMT IN ('EXP_COVERED')

    THEN
    IF (UPPER (V_SRC_SYSTEM_ID) IN ("UBS"))
    THEN
    IF (N_EXP_AMT_LCY (case when NVL(N_UNDRAWN_AMT_LCY,0) < 0 +))
    THEN 0
    of other NVL(N_UNDRAWN_AMT_LCY,0)
    (END) * NVL(N_CCF_PERCENT,0)) < N_EXP_COVERED_AMT
    THEN

    UNDRAWN_AMT: = (N_EXP_AMT_LCY (+)
    -case when NVL(N_UNDRAWN_AMT_LCY,0) < 0
    THEN 0
    OF OTHER NVL(N_UNDRAWN_AMT_LCY,0)
    (END) * NVL(N_CCF_PERCENT,0));
    ON THE OTHER
    UNDRAWN_AMT: = N_EXP_COVERED_AMT;
    END IF;


    ELSIF (UPPER (V_SRC_SYSTEM_ID) ("VP", "FW", "FN"))
    THEN

    IF NVL(N_EXP_AMT_LCY,0) (CASE WHEN (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0)) < 0 +)
    THEN 0
    ELSE (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0))
    END) * NVL(N_CCF_PERCENT,0) < N_EXP_COVERED_AMT


    THEN

    UNDRAWN_AMT: = (NVL(N_EXP_AMT_LCY,0)(+)
    CASE WHEN (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0)) < 0
    THEN 0
    ELSE (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0))
    (END) * NVL(N_CCF_PERCENT,0));

    ON THE OTHER

    UNDRAWN_AMT: = N_EXP_COVERED_AMT;
    END IF;

    END IF;


    ELSIF P_UNDRAWN_AMT IN ('NO')

    THEN
    IF UPPER (V_SRC_SYSTEM_ID) IN ("UBS")

    THEN

    UNDRAWN_AMT: = (CASE WHEN NVL(N_UNDRAWN_AMT_LCY,0) < 0
    THEN 0

    OF OTHER NVL(N_UNDRAWN_AMT_LCY,0)
    (END);

    ELSIF (V_SRC_SYSTEM_ID) UPPER IN ("VP", "FW", "FN")
    THEN
    UNDRAWN_AMT: = (CASE WHEN (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0)) < 0

    THEN 0
    ELSE (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0))
    (END);
    END IF;

    END IF;

    RETURN UNDRAWN_AMT;
    END Fn_Dt_Get_amnt;

    Setting run

    Oracle 10g 10.2.0.3.0
    SELECT FN_DT_GET_AMNT(1002872,'FW',699737.78,752154,0.5,52416.22,'EXP_COVERED')
    the double - power - 402285.11

    Oracle 10g 10.2.0.1.0
    SELECT FN_DT_GET_AMNT(1002872,'FW',699737.78,752154,0.5,52416.22,'EXP_COVERED')
    the double - power - 1002872

    I think the problem is with NVL, such that the code works fine with Coalesce on the two configurations. Can someone explain why?

    It is a bug, as evidenced by the test case I posted.
    Apparently when multiple NVLs are used with the CASE in the same expression.

    Works fine in the following versions:
    10.2.0.4
    10.2.0.3
    9.0.1.1.1

  • mutation in the triggers table problem (need to COUNT (col) and MAX (col) of table shot)

    I was looking for the solution and find many examples, but I do not know what is the best in my option and don't understand everything.

    I realized that can't do a SELECT query in the table where trigger is triggered. But I have need SELECT COUNT (col), then MAX (id) of this table, update some statistical info...
    And also need to row id update, so I can't do trigger of table instead of relaxation of the line.


    So this is my TRIGGER:

    create or replace

    update_stat relaxation

    AFTER UPDATE ON TABLE1 TO EACH LINE

    DECLARE

    juice FLOAT;

    all the NUMBER;

    end NUMBER;

    BEGIN

    IF (: old.ended <>: new.ended) THEN

    SELECT COUNT (id) FROM end FROM table1 WHERE fk_table2 = new.fk_table2 AND finished = 1;  -Error in the table of mutation

    SELECT COUNT (id) FROM everything FROM table1 WHERE fk_table2 = new.fk_table2; -Error in the table of mutation

    Juice: = ((end /all) * 100);

    UPDATE table2 SET suc = success WHERE id =:new.fk_table2;

    END IF;

    END;

    I also tried with

    pragma autonomous_transaction;

     

    trigger body....AND

     

     

    commit;

    But don't working right when insert more records.

    Thanks, Urban

    Data and structure of the example table

    SQL> create table table2
      2  (
      3     id        integer
      4   , success   number
      5   , constraint table2_pk primary key (id)
      6  );
    
    Table created.
    
    SQL> create table table1
      2  (
      3     id        integer
      4   , id_t2     integer
      5   , ended     integer
      6   , constraint table1_pk primary key (id)
      7   , constraint table1_fk_id_t2 foreign key (id_t2) references table2
      8  );
    
    Table created.
    
    SQL> insert into table2(id, success) values (1, 0);
    
    1 row created.
    
    SQL> insert into table2(id, success) values (2, 0);
    
    1 row created.
    
    SQL> insert into table1
      2  (
      3     id
      4   , id_t2
      5   , ended
      6  )
      7  select level
      8       , ceil(level/10)
      9       , 0
     10    from dual
     11  connect by level <= 20;
    20 rows created.
    
    SQL> commit;
    
    Commit complete.
    

    Create objects to the suite

    create or replace type update_stat_obj as object (id integer, id_t2 integer, ended integer)
    /
    create or replace type update_stat_tbl as table of update_stat_obj
    /
    create or replace package update_stat_pkg
    as
       g_table_1 update_stat_tbl;
       procedure load(p_id integer, p_id_t2 integer, p_ended integer);
       procedure updt;
    end;
    /
    show err
    create or replace package body update_stat_pkg
    as
       procedure load(p_id integer, p_id_t2 integer, p_ended integer)
       is
       begin
          if g_table_1 is null then
            g_table_1 := update_stat_tbl();
          end if;
    
          g_table_1.extend;
          g_table_1(g_table_1.count) := update_stat_obj(p_id, p_id_t2, p_ended);
       end;
       procedure updt
       is
       begin
           merge into table2 t2
           using (
                  select t1.id_t2
                       , (count(t2.id)/count(t1.id))*100 success
                    from table1 t1
                    left
                    join table(g_table_1) t2
                      on t1.id    = t2.id
                     and t2.ended = 1
                   group
                      by t1.id_t2
                 ) t1
              on (t2.id = t1.id_t2)
            when matched then
                update set t2.success = t1.success;
    
           g_table_1 := null;
       end;
    end;
    /
    show err
    create or replace trigger update_stat_row_trig after update on table1 for each row
    begin
        if (:old.ended <> :new.ended)
        then
           update_stat_pkg.load(:new.id, :new.id_t2, :new.ended);
        end if;
    end;
    /
    show err
    create or replace trigger update_stat_trig after update on table1
    begin
        update_stat_pkg.updt;
    end;
    /
    show err
    

    Now look for the UPDATE.

    SQL> select * from table1;
    
            ID      ID_T2      ENDED
    ---------- ---------- ----------
             1          1          0
             2          1          0
             3          1          0
             4          1          0
             5          1          0
             6          1          0
             7          1          0
             8          1          0
             9          1          0
            10          1          0
            11          2          0
            12          2          0
            13          2          0
            14          2          0
            15          2          0
            16          2          0
            17          2          0
            18          2          0
            19          2          0
            20          2          0
    
    20 rows selected.
    
    SQL> select * from table2;
    
            ID    SUCCESS
    ---------- ----------
             1          0
             2          0
    
    SQL> update table1 set ended = 1 where id between 1 and 7 or id between 11 and 19;
    
    16 rows updated.
    
    SQL> select * from table2;
    
            ID    SUCCESS
    ---------- ----------
             1         70
             2         90
    
    SQL> select * from table1;
    
            ID      ID_T2      ENDED
    ---------- ---------- ----------
             1          1          1
             2          1          1
             3          1          1
             4          1          1
             5          1          1
             6          1          1
             7          1          1
             8          1          0
             9          1          0
            10          1          0
            11          2          1
            12          2          1
            13          2          1
            14          2          1
            15          2          1
            16          2          1
            17          2          1
            18          2          1
            19          2          1
            20          2          0
    
    20 rows selected.
    
  • Images are the scale is no longer with (img {max-width: 100% ;}) css from the 34.0.5 in firefox update, it still works fine in IE and chrome.})

    My site was working fine up until firefox updated 34.0.5. Now the images will not scale to fit the box more. I use flexbox so that the site is changing to adapt to the size of the browser. In css, I set img {max-width: 100% ;} and this would make the jpg file size automatically to fit the area they were in, but no more than Mozilla really screwed up this with updated 34.0.5.} My site still works fine with IE and Chrome, but 70% of my web traffic using firefox so I would really like this to work in firefox.
    Any help is greatly appreciated!

    I work by setting a special parameter in CSS for the images that I needed to scale and then I have it referenced by SPAN for each img in HTML, not quite how I wanted it to work since now images filling the box even with monitors really big format, which means that they could now be blurred on a 4 k monitor but firefox left me no choice. Looks like I have going to aid in future chrome like firefox really shit the bed on this 34.0.5 updated

  • Can query serial port with NI MAX, but does not work in Labview

    I'm controlling a 488 Sapphire consistent with labview. It is connected by a series of converter USB in the computer. I can communicate with a device using NI MAX, but when I try to run the vi (attached), he works for multiple queries, but evetually returns a null character, after which I can no longer communicate with the port. If I then go into the NI MAX interface, whenever I try to read it give "VISA: (Hex 0xBFFF0015) timeout expired before the operation ended" error message. There are also several queriess of the manual of the instrument which do not seem to work at all (with or without MAX) and always returns a null character. Any help is appreciated. I'm definitely a novice with the communication of the device. Thank you.

    Usually a problem with the stop character.

    And you send-r and no CarriageReturn.

  • problems with calibation MAX 4.5 talk to LabView 8.6.1

    Hello
    I use using Max 4.5 with an NI USB-6259 box. When I calibrate a scale with her, it checks good with to check the calibration.
    When I run LabView 8.6.1 power off. more load more its judgment. but this happens in only a tension, compression is fine.

    Hi, cotton,

    I'm curious, is there another load cell that you can try?  How do you save your configuration of MAX?  Are calibrate you for tension and compression?  Have you tried to use a panel of test at MAX to see if it's just your LabVIEW program giving you bad readings?  In addition, is the program that you run an example program, or that you wrote? Thank you for these answers!

  • support for files with extension .max-cannot open files

    I got a HP with Windows 98 computer.  When I got a newer computer, I downloaded the scanned files of visoiaire scanner on the new computer with windows XP.  Files are associated with the program file extension. MAX.  I'm unable to open files with windows XP.  I'm technically incompentent.  Y at - it a to change extension of files or open with Windows XP?  detailed instructions will be appreciated.

    That's what Filext.com about MAX:

    MAX file type is primarily associated with "PaperPort" of ScanSoft Inc. file: PPPAGEVW. EXE. Also captured by Visioneer Page view. If you have been sent a photo of a person in this format, try using the Viewer. If this does not work for you ask them to send the image in a format, you can display.

    This means that the Visionaire scanner connected to your old Win98 computer has been configured to save the files analyzed in this proprietary format.  The Viewer for this format - pppagevw.exe - no doubt has been installed on the Win98 computer, when the scanner was installed.

    Unfortunately, your new computer is that Viewer, you need to get here (go to the bottom of the page): http://support.visioneer.com/products/Tools/Utilities_2000_XP.asp

  • Tabular with dynamic update DB

    I have a tabular layout with column of a status which is a LOV. When you click on the different statuses, it changes the color data and background.

    To update the changes in the DB, you must click on the "SUBMIT" button.

    I would like to kick off the DB update dynamically when changes color. Nothing I've tried so far is updating the DB. Is there a way to do this?

    There are a few ways to do this, but they will take certain amount of Javascript.

    You use a dynamic action to change the color?

    If so, look at the action "run the Code in PL/SQL.  It allows you to run PL/SQL in the background as an AJAX request, which is exactly what you described.

    The trickiest part about this is the form of tables. Before you can run the Code in PL/SQL ", you will need to enter the values for the form of table, you need to save and place them on hidden items that are not protected. Then the PL/SQL code can refer to these elements as bind variables. Make sure that you list the point on the field "Page to go".

    If you do not use DA, you can always do this with javascript apex.server.proess call.  Search for a few examples.

    Post your progress and help you along.

    Thank you

    -Jorge

  • Tabular with LOV PPR and popup errors

    I have a tabular presentation with several fields, which uses a value of selection as part of its sql source list.

    The fields are popup lov is that there are too many options for a selection list has.  While these work very well by default, so enable partial-page refresh in the form of tables and add a dynamic action for when the selection list is changed to refresh the form, whenever I try and add a new line of the window popup lov throw errors javascript 'object expected '.

    Someone else has come across this or know of a workaround?

    The apex is 4.2.5


    See you soon

    Have not met before, probably because usually I avoid discounting on tabular forms.

    But some research, I believe that what is happening is completely normal.

    When the page loads everything first, the init of the widget in a table row contains the javascript function calls. This means that the various manipulations on the plain text of it will also handle content of the script (and name etc.). What causes more functions to create the lines are created, as a function in the global scope is created for each line and each element.

    However, when page html code is retrieved on the server is placed in the document jQuery.html () - which "eats" the script tags and. After the update, the init line is reset. Because without script tags are present more that no function or is created. Where a javascript error because a nonexistent function is called.

    Note however, that this works when you add new rows in an index position that a line of work previously. In your case, if after the initial page load, you need to add a line, and then use the select that triggers the update, add a new line again no will cause an error. Features are created in the global scope, so they keep existing.

    Workaround solution? Yes, okay. Ugly as hell, but what is the source.

    1 / get elements of the last row lov

    2 / check these points if the associated function already exists

    3 / if not, go get the original function, discussed in the text, do replace it and add it to the global scope

    Add this to the declarations of functions and global variables:

    Only works for apex 4.2 AND a wizard generated in a table (not apex.item!)

    function myAddRow(){
      apex.widget.tabular.addRow();
    
      var lRowNum = apex.widget.tabular.gNumRows + apex.widget.tabular.gNewRows;
    
      $("#"+apex.widget.tabular.gTabFormReportID+" table.uReport tr:last span.lov input[type=text]").each(function(){
      var lName = $(this).attr("name");
      var lCheck = window["genList0_"+lName+"_"+lRowNum];
      var lOriginal = window["genList0_"+lName+"_$_row"];
    
      if ( typeof lCheck !== "function"){
        var lOld, lNew;
        lOld = lOriginal.toString();
        lNew = lOld.replace(/_0000/g,'_' + apex.widget.tabular.pad( ( lRowNum ), 4 ) );
        lNew = lNew.replace('p_element_index=" +  escape (\'0\')','p_element_index=" +  escape (\'' + ( lRowNum )+'\')');
        lNew = lNew.replace(/\$_row/g,( lRowNum ) );
        console.log(lNew);
        eval.call(window, lNew);
      };
      });
    };
    

    Change the button Add line to now call "apex.widget.tabular.addRow ()" but do call "myAddRow()".

  • ORA-01446 tabular with CONNECTION BY LEVEL &lt; = 2

    I created a tabular presentation where I want the 2 last lines be empty so that the user can enter new lines immediately (for example, the first time that no data is found).
    Here's the sql code of the form of tables:
    select 
    "ID",
    "REQ_ID",
    "QUANTITY",
    "FRAME_SIZE",
    "FRAME_TYPE",
    "PROTECTIVE_COVERING",
    "MATT",
    "MATT_COLOR"
    from "#OWNER#"."CREATIVE_SVC_DESIGN_FRAMING"
    union all
    select
    null id,
    null req_id,
    null quantity,
    null frame_size,
    null frame_type,
    null protective_covering,
    null matt,
    null matt_color
    from dual
    connect by level <= 2 
    I get the following error:
    Failed to parse the SQL query:
    ORA-01446: cannot select ROWID, or sample, a view with DISTINCT, GROUP BY, etc.

    The query is not access ROWID view at all. And, as you can see, it does not use a DISTINCT, GROUP BY, etc...

    My APEX is Application Express 4.0.2.00.07
    My database is 10g (10.2.0.5.0)

    Help, please!

    Robert
    http://apexjscss.blogspot.com

    Robert,

    I wish I had a better explanation for you, but I know something again with 4.1 broke this trick union for tabular forms. I had to do a dynamic action that runs when the page loads and calls the javascript function of the: AddRow(). I think it has something to do with the validation of the form in a table, but I'm not sure.

    See you soon,.
    Janet Tyson

  • Details of employees with salary max theor Dept

    Hi all

    I'm trying to find some thedetails of all employees with the maximum salary in their Department.

    I find using a few max (salary)
    SELECT max (salary) FROM employee GROUP BY Dept.
    But how to find the empno, ename, salary and other details?

    Here are the data of employees
    EMP NO  NAME       INIT  LASTNAME     DEPT  NO       HIRE DATE  JOB       LEVEL   SEX  BIRTH DATE   ARY     BONUS    COMM
    000010  CHRISTINE  I     HAAS         A00   3978     1965-01-01 PRES      18      F    1933-08-24   52750   1000     4220
    000020  MICHAEL    L     THOMPSON     B01   3476     1973-10-10 MANAGER   18      M    1948-02-02   41250   800      3300
    000030  SALLY      A     KWAN         C01   4738     1975-04-05 MANAGER   20      F    1941-05-11   38250   800      3060
    000050  JOHN       B     GEYER        E01   6789     1949-08-17 MANAGER   16      M    1925-09-15   40175   800      3214
    000060  IRVING     F     STERN        D11   6423     1973-09-14 MANAGER   16      M    1945-07-07   32250   500      2580
    000070  EVA        D     PULASKI      D21   7831     1980-09-30 MANAGER   16      F    1953-05-26   36170   700      2893
    000090  EILEEN     W     HENDERSON    E11   5498     1970-08-15 MANAGER   16      F    1941-05-15   29750   600      2380
    000100  THEODORE   Q     SPENSER      E21   0972     1980-06-19 MANAGER   14      M    1956-12-18   26150   500      2092
    000110  VINCENZO   G     LUCCHESSI    A00   3490     1958-05-16 SALESREP  19      M    1929-11-05   46500   900      3720
    000120  SEAN             O'CONNELL    A00   2167     1963-12-05 CLERK     14      M    1942-10-18   29250   600      2340
    000130  DOLORES    M     QUINTANA     C01   4578     1971-07-28 ANALYST   16      F    1925-09-15   23800   500      1904
    000140  HEATHER    A     NICHOLLS     C01   1793     1976-12-15 ANALYST   18      F    1946-01-19   28420   600      2274
    000150  BRUCE            ADAMSON      D11   4510     1972-02-12 DESIGNER  16      M    1947-05-17   25280   500      2022
    000160  ELIZABETH  R     PIANKA       D11   3782     1977-10-11 DESIGNER  17      F    1955-04-12   22250   400      1780
    000170  MASATOSHI  J     YOSHIMURA    D11   2890     1978-09-15 DESIGNER  16      M    1951-01-05   24680   500      1974
    000180  MARILYN    S     SCOUTTEN     D11   1682     1973-07-07 DESIGNER  17      F    1949-02-21   21340   500      1707
    000190  JAMES      H     WALKER       D11   2986     1974-07-26 DESIGNER  16      M    1952-06-25   20450   400      1636
    000200  DAVID            BROWN        D11   4501     1966-03-03 DESIGNER  16      M    1941-05-29   27740   600      2217
    000210  WILLIAM    T     JONES        D11   0942     1979-04-11 DESIGNER  17      M    1953-02-23   18270   400      1462
    000220  JENNIFER   K     LUTZ         D11   0672     1968-08-29 DESIGNER  18      F    1948-03-19   29840   600      2387
    000230  JAMES      J     JEFFERSON    D21   2094     1966-11-21 CLERK     14      M    1935-05-30   22180   400      1774
    000240  SALVATORE  M     MARINO       D21   3780     1979-12-05 CLERK     17      M    1954-03-31   28760   600      2301
    000250  DANIEL     S     SMITH        D21   0961     1969-10-30 CLERK     15      M    1939-11-12   19180   400      1534
    000260  SYBIL      P     JOHNSON      D21   8953     1975-09-11 CLERK     16      F    1936-10-05   17250   300      1380
    000270  MARIA      L     PEREZ        D21   9001     1980-09-30 CLERK     15      F    1953-05-26   27380   500      2190
    000280  ETHEL      R     SCHNEIDER    E11   8997     1967-03-24 OPERATOR  17      F    1936-03-28   26250   500      2100
    000290  JOHN       R     PARKER       E11   4502     1980-05-30 OPERATOR  12      M    1946-07-09   15340   300      1227
    000300  PHILIP     X     SMITH        E11   2095     1972-06-19 OPERATOR  14      M    1936-10-27   17750   400      1420
    000310  MAUDE      F     SETRIGHT     E11   3332     1964-09-12 OPERATOR  12      F    1931-04-21   15900   300      1272
    000320  RAMLAL     V     MEHTA        E21   9990     1965-07-07 FILEREP   16      M    1932-08-11   19950   400      1596
    000330  WING             LEE          E21   2103     1976-02-23 FILEREP   14      M    1941-07-18   25370   500      2030
    000340  JASON      R     GOUNOT       E21   5698     1947-05-05 FILEREP   16      M    1926-05-17   23840   500      1907
    200010  DIAN       J     HEMMINGER    A00   3978     1965-01-01 SALESREP  18      F    1933-08-14   46500  1000      4220
    200120  GREG             ORLANDO      A00   2167     1972-05-05 CLERK     14      M    1942-10-18   29250   600      2340
    200140  KIM        N     NATZ         C01   1793     1976-12-15 ANALYST   18      F    1946-01-19   28420   600      2274
    200170  KIYOSHI          YAMAMOTO     D11   2890     1978-09-15 DESIGNER  16      M    1951-01-05   24680   500      1974
    200220  REBA       K     JOHN         D11   0672     1968-08-29 DESIGNER  18      F    1948-03-19   29840   600      2387
    200240  ROBERT     M     MONTEVERDE   D21   3780     1979-12-05 CLERK     17      M    1954-03-31   28760   600      2301
    200280  EILEEN     R     SCHWARTZ     E11   8997     1967-03-24 OPERATOR  17      F    1936-03-28   26250   500      2100
    200310  MICHELLE   F     SPRINGER     E11   3332     1964-09-12 OPERATOR  12      F    1931-04-21   15900   300      1272
    200330  HELENA           WONG         E21   2103     1976-02-23 FIELDREP  14      F    1941-07-18   25370   500      2030
    200340  ROY        R     ALONZO       E21   5698     1947-05-05 FIELDREP  16      M    1926-05-17   23840   500      1907
    I would like to find (empno, name, job, dept, sal) details of all employees earning a maximum wage in their Department.
    I'm not sue if I have to use funcion analysis here.

    THX
    Rod.
    select *
    from
    (
       select e.*,
              dense_rank() over (partition by dept_no order by salary desc) dr
       from   employees e
    )
    where dr = 1;
    
  • Problems with &lt; colgroup &gt; &lt; style col = "" &gt;

    Hello all, me again.

    For the first time that I try to assign functions to a table by the use of < colgroup > and < style col = "" >

    I can't even change the color of the column using an inline style

    I went on the w3schools website and the code works partially with the conditions listed in the < style > header - with the exception of column with.

    I bet it has something to do with the legacy that I don't see.

    The corresponding code is less to:

    My questions:

    1. as I type, DW wants to force a ' / > ' at the end of my < style col = "" > box. Why?

    2. what I am doing wrong? (as usual, I'm sure there will be something trivial)

    -styles in a style sheet-

    {table.admintable}

    Width: 75%;

    margin-top: 2%;

    margin-left: auto;

    margin-right: auto;

    background-color: #DBD9FD ;}

    table.admintable td {}

    border: 1px dotted black;

    text-align: center ;}

    {.admincol1}

    column-width: 250px;

    background-color: red ;}

    {.admincol2}

    column-width: 100px ;}

    {.admincol3}

    column-width: 50px ;}

    -code in html

    < table class = "admintable" >

    < colgroup >
    "< class col ="admincol1">."
    "< class col ="admincol2">."
    "< class col ="admincol3">."

    < / colgroup >

    < tr > <th > Date < /th > <th > name < /th > <th > Type < /th > <th > comments < /th > < /tr >
    < tr > <td > 01/05/13 08:83 < table > <scan td > < table > <pdf td > < table > <td align = "left" > home measures bp < table > < /tr >

    < /table >

    PS - I added the colors just to allow you to 'see' things better.

    TimSPQR wrote:

    I feel that HTML5 is evolutionary, not revolutionary.-

    This is the case. It was deliberately designed to be backward compatible. That is why Murray said that it is safe enough to use as a default value.

    The main disadvantage with HTML5 is that Internet Explorer 8 and will not earlier apply styles to the new structural elements, such as

    and
    , without the aid of a small file called JavaScript HTML5 shiv. If you are new to web development and do not understand how to use the HTML5 shiv, just stick with help of
    to group HTML items together.

  • Agreement with the max function

    Hello. I have the following sql sentence

    INSERT INTO SELECT Consecutivo max (idconsecutivo) + 1, idpais, max (conssolicitud) + 1 as conssolicitud,
    Max (consot) as consot, pFechaalta, pFechamodificacion, pFechabaja, pIdusuarioalta,
    OF consecutivo WHERE idpais =
    Group (SELECT idpais FROM regional) by idpais;

    I use max to insert a new file with the new values

    I have the following question: is there a problem with this sentence? I mean, what type of competition problem may exist with this sentence?

    I tried to do with nextval but I got error: INSERT INTO SELECT Consecutivo seq_consecutivo.nextval + 1,...

    Thanks in advance.

    Add a new variable here (see below):

    pIdusuariobaja IN OUT Ot.Idusuariobaja%Type
    )
    AS
      v_next_val    number(10); /* add new variable here */
    BEGIN
    

    and then use it in SQL as I said in my previous post.

Maybe you are looking for