update line and reset the value of the column

I have table (CORS_MTR) with 3 columns...

SEQ ID of the EPR the ID of the child / / desc
100221one
101222two

new entry as 1 number , that means change the flow of child #

102223three

When I enter the new line in number of children 1 instead of 2 and then the values of the column (child id, desc) another need to be reset as...

SEQ ID of the EPR the ID of the child / / desc
100222two
101221one
102223three
103224four
SEQ PRT_ID CHILD_ID DESC_
100 22 1 one
101 22 2 two
102 22 3 three

declare

number of p_seq: = 103;

number of p_prt_id: = 22;

number of p_child_id: = 1;

p_desc varchar2 (25): = 'a ';

Start

Update cors_mtr

set seq = case when child_id = p_child_id

then seq + 1

other seq - 1

end

where prt_id = p_prt_id

and child_id (p_child_id, p_child_id + 1);

insert into cors_mtr (seq, prt_id)

values(p_seq,p_prt_id);

Update cors_mtr

Set child_id = (select max (child_id) + 1 of the cors_mtr).

desc_ = (select to_char (to_date (max (child_id) + 1, 'J'), 'jsp') of cors_mtr)

where child_id is null.

end;

SEQ PRT_ID CHILD_ID DESC_
100 22 2 two
101 22 1 one
102 22 3 three
103 22 4 four

Concerning

Etbin

Tags: Database

Similar Questions

  • My 4th generation Apple TV installed an update and asked my password which he refused to accept time and time again. How to go beyond this screen and reset the unit?

    My 4th generation Apple TV installed an update and asked my password which he refused to accept time and time again. How to go beyond this screen and reset the unit?

    If she needs your Apple ID password and you have enabled 2-factor authentication, you might have to temporarily disable the connection to complete.

    Also, you need an internet connection to perform this step here.

    If your problem is not of the above, please describe more completely. Furthermore, to give specific messages on the screen.

  • I've updated the plan of the photographer and since the download, I had problems nonstop with fluidity and now the bridge is not displayed large previews, a few thumbnails. I restarted and reset the tool, is there anything else I can do or should I cancel

    I've updated the plan of the photographer and since the download, I had problems with non stop with fluidity and now the bridge is not displayed large previews, a few thumbnails. I restarted and reset the tool, is there anything else I can do or do I cancel my subscription to the CC and return to the CS6?

    The problem of fluidity can be the result of a graphics card problem:

    Try to uncheck the box in the preferences > performance > graphics processor use, then by restarting Photoshop. If this solves the problem, check with the manufacturer about a possible update.

    On the bridge: when you select an image and press the space bar, what happens?

  • try to install update KB981715 and receive the error code 80070663

    tried to install the update and get the error code all the time.  How to install this update

    lindeelou,

    Please post with the information requested here: what to post in the Windows Update forum
    Start with these troubleshooting steps and post returns with the requested info and arises from the troubleshooting.

    Clean boot your PC, and then run Windows Update.

    Reset the Windows Update components

    Perform operations of KB883825

    Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • iOS block report because of the third-party application, I answered and they managed remotely on the computer, now I know it's a scam, I turned off and reset the password, I'm in the clear?

    iOS block report because of the third-party application, I answered and they managed remotely on the computer, now I know it's a scam, I turned off and reset the password, I'm in the clear?

    If you allowed anyone remote access to your computer (and you're talking about a computer since you mentioned iOS which is the OS for iDevices; computers run on Mac OS X), while no one knows what they were able to install. Assume the worst and:

    Notify your credit card company / bank of potential fraud

    Change your bank accounts and report your fly/fraud credit card

    Change all of your passwords

    And, finally, erase your entire hard drive and reinstall the OS from scratch using recovery or your original installation disks.

  • What port bulk charge and reset the field data, using SSL?  Are there more ports beyond 7002 just?

    Hi, we have short components configuration problems in an implementation of SSL Linux 64.  The rest of the components work, but not the load mass and reset the data domain.  We believe that this could be a problem to port because the environment is locked by defalut.  7003-8000 ports will not be open by default.

    On the side of the design, we have the arguments defined VM as below, which appear correct.

    Djavax.net.ssl.keyStore=/disk1/Oracle/Middleware/user_projects/domains/endeca_integrator_service_domain/security/ssh/endecaServerClientCert.ks-Djavax.net.ssl.keyStorePassword=***-Djavax.net.ssl.trustStore=/disk1/Oracle/Middleware/user_projects/domains/endeca_integrator_service_domain/security/ssh/endecaServerTrustStore.ks-Djavax.net.ssl.trustStorePassword=***

    any thoughts?

    You can configure the port ranges that short Server will use.  This applies to both ports of the primary for web services (usually 7001/7002 for Non-SSL/SSL) as well as the underlying ports that are listening on the areas of individual data.

    Almost everything is going through the ports of short primary server (7001/7002) to lock things should not be a problem, as the "traffic" would come from the local computer.  That said, by exploiting the essential ingest functionality requires a direct contact between Integrator (or Integrator Server) connection and the data domain.  If the ports are not open and inclusive tent ingestion of a different area, you'll get failures.

    As with anything related to SSL, I recommend always get your sorted environment (open ports, firewall, etc.), then activation of SSL.  If you are not sure about ports AND you are not entirely sure of the configuration of SSL, it can be very difficult to solve the two simulanteously.

    Patrick Rafferty

    Branchbird

  • I'm trying to create a PDF file with several signature lines in that anyone can "Sign" by using their digital signature CAC (Common Access Card) active. The goal is to have a single document that people can open, sign on a designated line and save the doc

    I'm trying to create a PDF file with several signature lines in that anyone can "Sign" by using their digital signature CAC (Common Access Card) active. The goal is to have a single document that people can open, sign on a designated line and save the document (replacing the existing document) and close. Then another person can open the same document digitally sign another area of the form, save it, and close it. So on, and so on. Is there a way to do this? At the end of the day, I would end up with a PDF file with literally hundreds of signatures to enable different ACC everywhere...

    I don't understand what the problem is. In the post of the davidr96549424 on May 8, 2015 07:58 you presented a structure of a correct document. Is the issue of the creation of this structure in a PDF file? For this, you will need an Acrobat, not reader.

    XI in Acrobat, select Tools-> forms-Edit. Click 'No' on the form fields 'detect '. In the tasks Panel that opens, click on "add new field". Select "Digital Signature" and move it to the location in the document where you want to than the appearance of the signature to be. Repeat that for signature fields as you want. Users will sign by clicking on the prepared unsigned signature field which shows the dialog box "sign. Do not forget that as TSN has noted that a digital signature applies to the entire document. The entry in the document where it is is irrelevant. Each next signature covers all previous signatures.

    Your users can also sign a document from anywhere that they want without signature fields already prepared. For this select fill & sign-> work with certificates and the type of signing you want to sign up with. A dialog box that will tell you a rectangle for the appearance of signature rises and after you draw the rectangle of the dialog 'Sign' rises.

    PDF/Acrobat doesn't have a limit on a number of signatures in a PDF document. But! Don't forget that when you open a PDF file with Acrobat/Reader signatures valid all of them and takes time (several seconds - until 10 - for every signature), so if you have several signatures of dozens of their validation open can take a long time.

    I don't know how build you your workflow so that each person signs the same PDF and saves it. Economy runs on the same computer where the PDF is stored. You'll have to decide how to allow different people to have access to the same PDF. They, of course, you may sign this only one-at-a-time PDF.

  • Remove activate them, deactivate and remove the columns of searchUser.do

    Hello
    What form of jsp I have to modify to remove the option activate, deactivate and remove the columns on the searchUser.do page? I edited tjspSearchUserResultsTiles.jsp but who do not appear to do.
    Thank you

    To do this, you will need to customize JSP. It includes TableGenerator.jsp, so you will need to write your logic here to hide these buttons or you will need to write your own JSP and put it instead of tjspSearchUser.jsp

  • Edge 14. Battery not charging after the Power Manager Update to 6.07 and resetting the battery.

    My battery will do not, at all.

    The gauge was obviously wrong to happen very quickly after reaching 20%, so I've updated the power to 6.07 Manager and then perform a reset of the battery (I'm sure it's in that order, perhaps first reset).

    After resetting the battery charged to 100% back, but as it is discharged, the charger was not.  With the power, the battery is located just at the same percentage and descends very slowly (about 1% in two days).

    I tried to play with the parameters of maintenance battery, the meter then said that charge will begin less than 80%, but the battery is already on the 20%.  I checked the firmware in the Manager of power and with the stand-alone program but apparently no update is necessary and T 42, 4755 FRU part number is not listed as needing an update.

    Current version of the firmware: 3f98-0004-0160-0130

    I tried uninstalling and reinstalling Power Manager.  The power windows manager also seems to have the same problem.

    I just baught the laptop last year, is a month out of warranty; I need it to be portable to work.

    I thought about buying a new battery, but it seems to be the charge function is not working, and the battery was working fine before the reset and the update, apart from the loss of certain abilities and the inaccurate meter.

    Product: 0578CTO Thinkpad Edge 14

    BIOS: 80ET61WW (2.01)

    Any help would be greatly appreciated.

    Nathan

    19% and declining

    Hi NINE.

    Thank you for hospitality, the effort and the answer.  Greatly appreciated.

    I tried this and just tried to reinstall the firmware of power management.

    I finally solved the problem after reading this post by:

    1 shut down the computer.

    2. unplug the power supply cord (and everything - usb and monitor cables).

    3 remove the battery.

    4. play with the spring on the battery switches and shake threatening (probably unnecessary, but you may want to give it 10 to 15 seconds on the laptop).

    5. replace the battery in the laptop.

    6. connect the power cord.

    7. start the laptop and connect.

    Thanks again.

    Nathan

    48% and load

  • Black screen and resetting the system

    My Macbook Pro goes to a black screen with the launch of the color wheel, which requires a reboot of strength with the power button. Restart the system fixed compensation to my home folder and preferences reset all icons by default and demanding connect me with my apple as if ID from for the first time.

    This is the second time that this has happened, reset initial was thought to be caused by a recent bug in Adobe Creative cloud files deleted, but apparently it was fix so my problem can come from somewhere else

    any help appreciated

    With the fix Adobe deleted folder in the root is not restored. For the question remains the same even if the bug is kidnapped by Adobe. It is not restored because Adobe doesn't know what has/is in this folder.

    Following what you can do: show the files hidden value and in the Finder, go to the root (select the startup disk), look at the first record, until there was a file (name beginning with a.) which is cleared by the Adobe CC update, now enter TimeMachine, go to the date before you did the update say 25 - th of February 2016, you will see the deleted file (the first file), restore it.

    Then restart.

    When you are unable to restore this folder, start while now the keys CMD + R, select 'Install OS': who will install OSX and let your only user data. I'm not sure that this will restore this lost file, because I don't know what it was.

  • problem - by clicking on the button loses the new line or resets the iterator

    Hello

    I use JDev 11.1.1.6. I created a page that is preceded in the taskflow by a method in the AppModule that creates a line on the iterator and inserts it. I have a button 'Next' in the page, which is supposed to make changes to attribute readonly on the input fields, and display a confirmation button.

    The problem: when I click on 'next', the empty fields that have been entered by the user on the page, is part of the first record in the iterator. It is as if, when the button "Next" has been clicked, the iterator has been somewhat refreshed and moved to the first original line, and entered values have been thrown in there... While my 'new' record is lost. Result: I lose my new record line, and entered values replace the values in the first previous row in the iterator.

    The code used to create the line before the page is loaded:

    Sender ViewObjectImpl = getSubmittersView3_1();

    Submitter.Reset ();

    ViewRowImpl submitterRow = submitter.createRow () (ViewRowImpl);

    submitter.insertRow (submitterRow);

    When the page is loaded initially, I printed the primary key on the line and a - 4 (which is good, it means new line)

    But when I print the primary key in the action of the button 'Next', 59, who has been the pharmacokinetics of the first original line I.

    The code that is used to print the primary key:

    seqNum int = Integer.parseInt (this.getAppModule () .getSubmittersView3_1 () .getCurrentRow () .getAttribute (0) m:System.NET.SocketAddress.ToString ());

    Then print seqNum.

    Please help.

    Found the problem.

    I had a button print at the bottom, which was my button "Cancel". In this paper, I got the code to remove additional items (i.e. unwanted ranks - since it is a Cancel button). And what was going on was that while rendering on the page, the code of the EEG for the go button was running and the removal of my new line! If the culprit here was go get code button is iterated in the rendering phase... something I didn't expect or know so far. Remove this code and change a command button solves the problem.

  • Updated lines and default values.

    This is my last thread for a while. My final problem with my apex application is related to the update of lines.

    I have a tabular presentation to display several rows for a table and want to add a hidden 'updated_by' and 'last_updated' column. I put their default values such as user name and sysdate that work well for new records, but how each line to add these to existing records?

    I use 4.02 on 11g.

    Hi Craig,.

    Have you considered using a trigger on the table instead of setting these values from the app? A few advantages are: less logical in the app, especially if these inserts/changes can come from several pages, and once the trigger is implemented it will define values independently from changes and insertions (your form, another form, a non-ApEx client app, etc.).

    CREATE OR REPLACE TRIGGER biu_mytable
       BEFORE INSERT OR UPDATE
       ON mytable    REFERENCING NEW AS new OLD AS old
       FOR EACH ROW
    BEGIN
       :new.updated_by := NVL(v('APP_USER'), USER);
       :new.last_updated := SYSDATE;
    END biu_mytable;
    

    Any insert or update triggers the shutter, define two columns. The NVL call handles the case when a customer non-ApEx brings the insert or update. If APP_USER has a value (ApEx logged-in user), the trigger uses it; Otherwise, it uses the database user ID.

    Hope this helps,
    John

    If you find this information useful, please indicate the 'useful' or 'correct' post so that others benefit. *

  • Don't know what updates I need through the center of update. And get the following error message popup every minute, wuauclt.exe.

    Please, I beg you, help me please I need this computer for my work and am already 1 day behind by logging into my company to do my job (I have Windows XP Version 2002 service pack 2)

    Not only can't update windows via the update enter but an error message continues to appear every minute that used to go.

    It says "wuauclt.exe has encountered a problem and needs to close. We are sorry for the inconvenience. »

    If I click on th does not send or send error report this message keeps popping up. When I click the to see what data link, he said:

    "Error signature szAppName: wuauclt.exe szAppVer: 7.4.7600.226 szModName: szModVer esent.dll: 5.12600.2180 offset: 005d 424 '  Details of the declaration: this error report includes: observation information covers the status of wuauclt.exe when the problem occurred, the operating system version and used hardware and Protocol address Internet (IP) of your computer. etc, etc, etc.

    When I click on info tech I get

    Content error report the following files should be included in this error report: C:\DOCUME~1\Owner\ LOCALS~1\Temp\WER189a.dir00\wuauclt.exe.mdmp C:\DOCUME~1\Owner\ LOCALS~1\Temp\WER189a.dir00\appcompat.txt WER189a the number changes each time.

    So far, I ran McAfee, Microsoft Security Essentials and it keeps popping up. I still do not know what updates I need through the Update Center but could manually go and get service pack 3 by itself. I need to be able to use the center of update and do not have this message continues to flow upward.

    What I do?   Thank you so much Corina

    Hello
     
     
    Let us make the below listed methods and check if we still get the error message.
     
    Method 1.
    I would ask you to reset the Windows UPdate components and check if you still get this error message.
    Click the Fix It button in the article below to do it automatically or you can do it manually as wel. For more information, refer to the article below.
    How to reset the Windows Update components?
    http://support.Microsoft.com/kb/971058
     
     
    Method 2.
    If the error still persists please provide us with the error log:
    Type eventvwr.msc/s in the address bar.
    The list of all the events that are listed as 'Error' in the main window when you go to 'Newspapers Windows' and 'Application '. There is often a large number of them. Send us any ones you see listed for the last few days. (Please also do it for the log files in 'System'). When you do, provide us the name of the 'Source' and all that is listed in the description below the list of newspapers box when you click on one.
     
    Method 3.
    I would also recommend to install the Windows Update Agent to manage the updates on your computer.
    Download and install the Windows Update Agent to manage updates for your computer.
    Follow the link below to download and install Windows Update Agent:
    http://support.Microsoft.com/kb/949104

    Please let us know if this helps you resolve the problem or if assistance is needed.

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • my daughter forgot the password on this laptop, and now nothing can be upgraded. How do I change and reset the password

    computer is without hope, without updates

    If you have forgotten your password, if you have another user who has administrative privileges account you can log in to that account and change the password of your account of origin of the user accounts applet in Control Panel. If you do not have another account like this set upwards or that you do not have the password which you will need to log on to the built-in Administrator account. In XP Home, start the computer in Mode safe. This, by repeatedly pressing the F8 key as the computer starts. This will put you in the right menu. Navigate using your arrow up; the mouse does not work here. Once in safe mode, you will see the normally hidden administrator account. The default password is white.

    In XP Pro, you don't need to go to Safe Mode. In the home screen, do Ctrl-Alt-Del twice to get the classic Windows logon box. Type in "Administrator" and the password that you assigned when you set up Windows.

    If you reset the password of the account administrator integrated into house or have Pro and don't remember the password, use NTpasswd to change the password of the built-in to a white administrator account. Download the bootable CD .iso image file, burn with third-party burning software such as free ImgBurn , Nero or Roxio. Burn as an image, not in the form of data. Start with the media that you have created. You need to maybe change the boot order in the BIOS or obtain a menu of boot command temporary with the pressure of a special key. NTpasswd will run. Follow the instructions carefully.

    http://home.eunet.no/pnordahl/ntpasswd/

    Then, go to the user accounts applet in Control Panel and set passwords that you remember and other changes. WRITE THE PASSWORDS DOWN AND PUT THEM SOMEWHERE YOU WON'T LOSE THEM.
    MS - MVP - Elephant Boy computers - don't panic!

  • update of NULL in the column with the values of the adjacent column

    Examples of data

    with test_data as
    (select 1 as one, null as two, 2 as three,5 as four, 6 as five, null as six from dual
    union all
    select 1 as one, null as two, 2 as three,5 as four, 6 as five, null as six from dual)
    select * from test_data;
    

    This is one of those cases, the case may be where any value of a column can be null

    or two similar columns can be null. If the column is null then I want to update the adjacent column

    average value of the column, if the first column is null so I want to take the next non-null column and update, if the last column is null

    so I want to take prev not zero column and to update.

    In this case would be my expected output

    Un Two Three Four Five Six
    11.52566
    123566

    Prospects for the future the suggesion or advice.

    Or, using Analytics:

    SQL> with test_data (id, one, two, three, four, five, six) as (
      2    select 1, 1   , null, 2   , 5, 6, null  from dual union all
      3    select 2, 1   , null, 3   , 5, 6, null  from dual union all
      4    select 3, 1   , null, null, 5, 6, null  from dual union all
      5    select 4, null, null, null, 5, 6, null  from dual
      6  )
      7  select *
      8  from (
      9    select id
     10         , cell
     11         , case when next_nn is not null and prev_nn is not null
     12             then (next_nn + prev_nn)/2
     13             else nvl(next_nn, prev_nn)
     14           end val
     15    from (
     16      select id
     17           , cell
     18           , val
     19           , last_value(val) ignore nulls over(partition by id order by cell) as prev_nn
     20           , first_value(val) ignore nulls over(partition by id order by cell range between current row and unbounded following) as next_nn
     21      from test_data
     22      unpivot include nulls (val for cell in (one as 1, two as 2, three as 3, four as 4, five as 5, six as 6) )
     23    )
     24  )
     25  pivot ( min(val) for cell in (1 as "ONE", 2 as "TWO", 3 as "THREE", 4 as "FOUR", 5 as "FIVE", 6 as "SIX") )
     26  ;
    
            ID        ONE        TWO      THREE       FOUR       FIVE        SIX
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
             1          1        1,5          2          5          6          6
             2          1          2          3          5          6          6
             3          1          3          3          5          6          6
             4          5          5          5          5          6          6
    

Maybe you are looking for

  • Presario SR5130NX bad video embedded - does not start

    I have a Compaq Presario SR5130NX equipped with a LCD HP vp17 using the onboard video. It is Windows Vista. The PC won't POST. There is no display at all with the exception of a brief message on the LCD indicating no video signal on a port, but there

  • Logo to boot at startup issues

    If anyone can help I would really appreciate it, I have an old computer that once belonged to a doctor's office and its HP Compaq dc7700 Small Form factor model #RW503US, running win xp pro, I just did a factory restore and the computer works well, t

  • Processor fan speed problem

    Hi all I have a Dell Inspiron 580 and the processor fan is limit every 13 seconds or more.  It runs all the time, but then accelerates.  Here's a video of him cs_setInnerHtml ('video_bb2015e9 - 6 c 21-4ad4-a1d8-b126466fbeab', "); Any suggestions? Tha

  • Please help a noob! What package of Photoshop?

    I would appreciate some advice of what Photoshop package/program I need to buy.My goal is to design small words/images to go on the clothing through iron on transfer.I am also interested in design designs custom chalk board for the birthdays of babie

  • Line move when I increase the weight of the race

    HelloI use dashes in a document. I have a series of lines that are centered on the grid lines; However, when I increase the weight of the race, the line moves as if the upper part of the race is anchored and not the center of the line.I am unable to