Update of a column by using the cursor

Hello world
always play with the stuff of newbie here. Is it possible to update a column or row with a slider? I understand how to extract data using a slider, but don't know if it helps to update the data.

If it is possible, what is the syntax?

Kind regards
Valerie

Valerie Debonair wrote:
Hello world
always play with the stuff of newbie here. Is it possible to update a column or row with a slider? I understand how to extract data using a slider, but don't know if it helps to update the data.

Why not read the fine manual? [Oracle® PL/SQL Database User Guide and reference | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/sqloperations.htm#i40107] describes all the constructions of cursor.

If it is possible, what is the syntax?

The best way is to use a PL/SQL implicit cursor, as follows:

declare
  empID number;
begin
  empID := 1234;

  update emp
    set salary = salary +100
  where empno = empID;

  commit;
end;

Tags: Database

Similar Questions

  • Problem with update of a column by using the procedure of database and refreshing or put in value programmatically

    Dear all,

    I am a beginner in the ADF and am under Jdeveloper Studio Edition Version 12.2.1.0.0.

    I have a page that consists of two taskflows.

    First workflow has a fragment which is to have a table based on view object salespersons (not editable)

    Second task flow contains a form of ADF from the same view object Salespersons.

    As the user selecting a line in the table of the same record is displayed as no problem.

    Now, I have added two buttons Activate and Deactivate that is to change the status of the sales.

    I tried to use two ways an updated using the procedure of database and then put in value by programming and I have different questions with two of them:

    Now, here's the code of the Java bean for activation:

    Option A - the problem with this is the value of the column in the list (the first task rate displayed) is not synchronized

    and Activate and Deactivate buttons are not disabled and active properly.

    {} public void confirmActivation (DialogEvent dialogEvent)

    If (dialogEvent.getOutcome () == DialogEvent.Outcome.yes) {}

    DBSequence vId;

    vId = dcId.getValue ((DBSequence));

    Links BindingContainer = getBindings();

    OperationBinding operationBinding;

    operationBinding = bindings.getOperationBinding ("changeSalespersonsStatus") (OperationBinding);

    operationBinding.getParamsMap () .put ("pId", vId.getValue ());

    operationBinding.getParamsMap () .put ("pStatus", "A");

    Object result = operationBinding.execute ();

    dcStatus.setValue ("A");

    } else {}

    return;

    }

    }

    Option B - the problem with this is that the value of input for status text appears in the Active form for all records in form regardless of its database.

    {} public void confirmActivation (DialogEvent dialogEvent)

    If (dialogEvent.getOutcome () == DialogEvent.Outcome.yes) {}

    -no doubt this two lines are not needed here

    DBSequence vId;

    vId = dcId.getValue ((DBSequence));

    dcStatus.setValue ("A");

    BindingContainer links = getBindings();

    OperationBinding operationBinding;

    the operationBinding = bindings.getOperationBinding("Commit") (OperationBinding);

    Object result = operationBinding.execute ();

    } else {}

    return;

    }

    }

    Here's the code from the Fragment of shape for used buttons.

    "< af:button text = 'Activate' id ="bActivate' icon="/icons/activate.png ' iconPosition = 'top '.

    partialTriggers = "Bcreer bSaveInsert bCancelInsert dDeactivate dActivate".

    Binding = "#{pageFlowScope.salespersonsForm.buttonActivate} '"

    Disabled = ' #{bindings. " Status.inputValue! {= ' n '} ">"

    < af:showPopupBehavior popupId = "pActivate" / >

    < / af:button >

    "< af:button text = 'Disable' id = 'bDeactivate' icon="/icons/deactivate.png ' iconPosition = 'top '.

    partialTriggers = "Bcreer bSaveInsert bCancelInsert dDeactivate dActivate".

    Binding = "#{pageFlowScope.salespersonsForm.buttonDeactivate} '"

    Disabled = ' #{bindings. " Status.inputValue! {= 'A'} ">"

    < af:showPopupBehavior popupId = "pDeactivate" / >

    < / af:button >

    Here's matching Popups for each of the buttons Activate and Deactivate.

    < childCreation = "deferred" autoCancel af:popup = "disabled" id = "pActivate" >

    < af:dialog id = "dActivate" type = "YesNo" title = 'Status of salespersons' closeIconVisible = 'false '.

    affirmativeTextAndAccessKey = "& amp; Yes"cancelTextAndAccessKey ="& amp; (Cancel)

    noTextAndAccessKey = "& amp; No '.

    dialogListener = "#{pageFlowScope.salespersonsForm.confirmActivation}" >

    < f: facet = 'buttonBar' name / >

    < af:outputLabel value = "Are you sure you want to enable the seller?" id = "ol1" / >

    < / af:dialog >

    < / af:popup >

    < childCreation = "deferred" autoCancel af:popup = "disabled" id = "pDeactivate" >

    < af:dialog id = "dDeactivate" type = "YesNo" title = 'Status of salespersons' closeIconVisible = 'false '.

    affirmativeTextAndAccessKey = "& amp; Yes"cancelTextAndAccessKey ="& amp; (Cancel)

    noTextAndAccessKey = "& amp; No '.

    dialogListener = "#{pageFlowScope.salespersonsForm.confirmDeactivation}" >

    < f: facet = 'buttonBar' name / >

    < af:outputLabel value = "Are you sure you want to disable the seller?" id = "ol2" / >

    < / af:dialog >

    < / af:popup >

    Thanks in advance.

    Best regards

    Arif Khadas

    If you bind components to a range of flow page bean. You must complete that it saves the State of the component longer than the life of the component.

    To change the value of the GET value of the component of the link layer and change it.

    In this way the changes are captured by the framework and you should see them.

    Timo

  • Column position of the cursor

    Among the interesting features of Homesite is that you can in addition to dsiplaying line numbers, you can click anywhere in your code (or text file), and the lower left corner of the screen will indicate the column position of the cursor. This is useful when parsing text files and debug javascript that gives you a line number and column position of the error code. I have line numbers enabled in Dreamweaver, but is there a way to determine the column position of the cursor (the number of characters in the line)?

    Thanks, I did a feature request.

  • I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?

    I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?

    11.1 and especially you have virtual column

    SQL> create table t
      2  (
      3     a number
      4   , b number
      5   , c generated always as (a+b) virtual
      6  );
    
    Table created.
    
    SQL> insert into t (a, b) values (1, 2);
    
    1 row created.
    
    SQL> select * from t;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
    

    Before that, a front insert - trigger

    SQL> create table t
      2  (
      3     a number
      4   , b number
      5   , c number
      6  );
    
    Table created.
    
    SQL> create or replace trigger t_default before insert on t for each row
      2  begin
      3    :new.c := :new.a+:new.b;
      4  end;
      5  /
    
    Trigger created.
    
    SQL> insert into t (a, b) values (1, 2);
    
    1 row created.
    
    SQL> select * from t;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
    
  • Why we use the cursor

    Hi all

    I would be grateful someone right me if I'm wrong. I ask the question below just for my purpose of learning.

    Question - Why do we use the cursor?

    Response Cursor is used to treat several lines in PL/SQL.

    Or

    Is used to treat a set of records from one or more tables, you can write a cursor on the table using select statement and then you can browse through all these a Recordset, and perform your required operations.

    Post edited by: Muzz, I'll open another discussion to my other question. Thank you

    Hello

    Muzz says:

    Hi all

    I would be grateful someone right me if I'm wrong. I ask the question below just for my purpose of learning.

    Question - When we use Procedure and Function when?

    Response

    When you want to run a series of DML statements then do like us and when we want to return a single value, then we use the function.

    Much has been written on this subject.  Start by finding some of them:

    https://www.Google.com/#q=when+use+procedure+function+Oracle

    read some of them and then ask a more specific question

    Procedures are not just for the DML; There are a lot of things in addition to DML you can do in the procedures.  For example, you can send e-mail messages, or can read and write files.

    The second half of your response, 'when we want to return a single value, then we use the function', is the right of bascally.  In particular, when you want to return a value that will be used in a SQL statement, you use a function.

    Functions in the pipeline are a special case.  A lot of what you read or you say about 'functions' means implicitly 'no Pipeline functions.

    Question - Why do we use the cursor?

    Response Cursor is used to treat several lines in PL/SQL.

    Or

    Is used to treat a set of records from one or more tables, you can write a cursor on the table using select statement and then you can browse through all these a Recordset, and perform your required operations.

    You'll have best results if you start a separate thread for each separate issue.  This issue is completely separate from the question on procedures

    You're right that the sliders are a way to process the rowsets, which can contain 1 line or several lines.

    Yes, you can use a slider to manage the rows one at a time.  Do not forget that it will be less effective than the manipulation of all at once, so don't use a cursor to do something that can be done in a single SQL statement.

  • When to use the cursor for loop and the cursor (open, fetch, close)

    Hello world
    I have a small doubt about when to use the cursor for loop and when to use the cursor for loop and the cursor (open, fetch, close).
    Well, I'm not the difference between implicit and explicit cursor. So please tell me how I got to know, what to use and when?




    Kind regards
    BS2012

    Published by: BS2012 on January 29, 2013 12:15

    All SQLs are analyzed, stored and executed as cursors. Thus, you will always use a cursor.

    The problem is that languages, such as PL/SQL, provide different interfaces to interact with the SQL cursor. As the ref, the slider interface, the interface DBMS_SQL slider interface and so on.

    Each of these interfaces offers different features. For example, using the interface DBMS_SQL allows binding dynamics and dynamic recovery. The Ref Cursor interface allows your code PL/SQL pass a handle to a reference pointing to the SQL cursor, to an external client. Etc.

    The fundamental reason for the use of an explicit cursor interface is mainly that you own and manage bulk made extraction output provided by PL/SQL cursor.

    With a cursor FOR , the motor loop of PL/SQL optimize the loop by extracting block a 100 lines both. However, you cannot access this collection in bulk directly inside the loop.

    With an explicit cursor interface, you specify the size of the extraction in bulk via the clause LIMIT , and you set the variable of collection to use. This allows you to use the collection directly variable inside the loop.

    However, the need to do - code manually in bulk collection - rarely occur in the daily programs in PL/SQL. A line of treatment is both slow and not well fits. And even if your bulk code collects lines, these lines must still be processed one at a time in your code. It is much more efficient and scalable rather write SQL code, and make the engine SQL the line of treatment for you.

  • How to view the line of columns without using the pivot keyword

    Hello
    could someone help me how to display lines in columns without using the keyword pivot and actuall is my scenario, iam having two tables with names and examples of data is shown below

    MIDDLE MINAME TASKID TASKNAME IDENTIFICATION PROJECT

    1 PROJ1 1 AA 100 PR1_TASK1
    1 PROJ1 3 CC PR1_TASK3 102
    1 PROJ1 DD 4 103 PR1_TASK4
    1 PROJ1 EE 5 104 PR1_TASK5
    1 PROJ1 6 105 FF PR1_TASK6
    2 PROJ2 EE 5 114 PR2_TASK1
    2 PROJ2 6 115 FF PR2_TASK2
    2 PROJ2 GG 7 116 PR2_TASK3
    2 PROJ2 HH 8 117 PR2_TASK4
    2 PROJ2 9 118 PR2_TASK5 JJ
    2 PROJ2 KK 10 119 PR2_TASK6
    2 PROJ2 1 AA PR2_TASK7 120


    The output should show the project and County of tasks at a given stage as shown below

    project AA BB CC DD EE FF GG HH JJ KK
    1 2 0 1 5 3 2 0 2 1 0
    2 1 2 0 2 1 0 2 4 3 1


    Thanks in advance,
    VVR
    CREATE TABLE pivot_test (
    ID           NUMBER,
    PROJECT      VARCHAR2(10),
    MID          NUMBER,
    MINAME       VARCHAR2(5),
    TASKID       NUMBER,
    TASKNAME     VARCHAR2(10)
    );
    
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 1,  'AA', 100, 'PR1_TASK1');
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 3,  'CC', 102, 'PR1_TASK3');
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 4,  'DD', 103, 'PR1_TASK4');
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 5,  'EE', 104, 'PR1_TASK5');
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 6,  'FF', 105, 'PR1_TASK6');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 5,  'EE', 114, 'PR2_TASK1');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 6,  'FF', 115, 'PR2_TASK2');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 7,  'GG', 116, 'PR2_TASK3');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 8,  'HH', 117, 'PR2_TASK4');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 9,  'JJ', 118, 'PR2_TASK5');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 10, 'KK', 119, 'PR2_TASK6');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 1,  'AA', 120, 'PR2_TASK7');
    
    SELECT ID as PROJECT,
           SUM(DECODE(miname, 'AA', 1, 0)) AS AA,
           SUM(DECODE(miname, 'BB', 1, 0)) AS BB,
           SUM(DECODE(miname, 'CC', 1, 0)) AS CC,
           SUM(DECODE(miname, 'DD', 1, 0)) AS DD,
           SUM(DECODE(miname, 'EE', 1, 0)) AS EE,
           SUM(DECODE(miname, 'FF', 1, 0)) AS FF,
           SUM(DECODE(miname, 'GG', 1, 0)) AS GG,
           SUM(DECODE(miname, 'HH', 1, 0)) AS HH,
           SUM(DECODE(miname, 'JJ', 1, 0)) AS JJ,
           SUM(DECODE(miname, 'KK', 1, 0)) AS KK
    FROM   pivot_test
    GROUP BY ID;
    
    PROJECT AA BB CC DD EE FF GG HH JJ KK
    ------- -- -- -- -- -- -- -- -- -- --
          1  1  0  1  1  1  1  0  0  0  0
          2  1  0  0  0  1  1  1  1  1  1 
    
  • I'm trying to update CS 6Illustrator tool by using the update but I continually get an error saying:

    I'm trying to update CS 6Illustrator tool by using the update but I always get an error saying "updates could not be applied." How can this be?

    Here is my log file:

    Update Adobe Illustrator CS6 (version 16.2.1)

    Failed installation. Error code: U44M1P7

    If you are using a mac: http://helpx.adobe.com/creative-suite/kb/unable-apply-extension-manager-update.html

  • How to choose the maximum value in a column of a table by using the cursor and iteration

    Hello everyone
    I have a table loan_detail
    and a column inside loan_amount
    now I want to take the values in this table with the cursor, then using iteration that I want to take a max value of him using this slider
    Here is my table
    LOAN_AMOUNT
    
    100
    200
    300
    400
    500
    5600
    700
    I could make using the concepts of single loop, but when I tried to do by using the slider I wasn't able to do.
    Concerning
    Prost

    You can get the maximum value for a particular column in SQL, PLSQL needn't; Always avoid PLSQL so you can do it in SQL. But always as an example:

    declare
    number of Temp: = 0;
    Start
    for news in some loan_amt of loan_detail
    loop
    If (temp
    end if;
    end loop;
    dbms_output.put_line (temp);
    end;

    Edited by: Mahanam January 5, 2011 03:11

  • HP laptop, 2000 - 2a20CA: Page of the screen shrinks by using the cursor key

    Laptop HP 2000-2a20CA

    No. B5R61UA

    It seems the upgrade from Win 7 to win 10 Home edition, in navigation or by using a Microsoft Office program, the windows Explorer.

    When you move the cursor with the touchpad and then listen to select a link, function etc. anywhere on the screen/page.

    The screen will decrease in size to the left or right of the screen or reduce to the taskbar.

    Clues, there is problem Win 10 or touchpad.

    HP 2000-2a20CA, running Windows 10 laptop

    Thank you

    I think I solved the problem because now I think.

    To check the HP site looking for updates to Win 10 and none were found.

    But then I changed my version of Windows to win 8 then rechecked updates and there is an update for the touchpad dated March 2016.

    Downloaded and installed, and everything seems OK so far.

    Thanks again.

  • Point display XY graph using the cursor data

    Hello all, I use XY graph to display amplitude v/s time. During the vi execution, data are continuously plooted on chart until the user stops the vi. I want to add a feature, such that, during the execution of the vi, when the user clicks on the chart to the situation with the cursor, it should show corresponding value of time and amplitude of this point. I mean the value of the axis corresponding to the category axis not the cursor position. When you use the position of the cursor, it is ok with the x axis, but it shows the cursor position for y axis (as property said), and I want datavalue said not not the position y axis.

    I hope it's clear with the question. I would like to have a few examples... for y = x graphic below, you can see cursor x = 4.4 and y = 6.8, how to view corresponding datapoint which must be y = 4.4

    When creating (or even after you've created), choose "align on the" plot 0.

    Do not let it be 'slide free.

    Attached example.

  • See the column position of the cursor in the code view

    I realized this was requested in 2008...

    Is there a way to display the character column where the cursor was when in code view? And consider the size of the tabs (i.e., counts tabs as the number of characters)? I'm trying to make sure align various blocks of code in classic asp massively complex (and ugly) code...

    Thank you.

    The current version of Dreamweaver does not display the column number. However, the media don't.

    In parentheses is a free, open-source editor created by Adobe. It was announced last year that consoles will be integrated in the next major release of Dreamweaver, and that a public beta would be released sometime this year. You can either wait that the public beta version (should be pretty quickly), or you can download media immediately.

  • Question: Style af:column header using the CSS style class

    Hello

    I have a simple requirement to set the background color of a column heading to 'red '.

    We use a custom look and I put in this entry in the .css. file

    AF | : column-head - cell.customcolheader {background-color: #FF0000 ;}}

    In my .jsff file, set the styleClass for the desired column

    < af:column id = "c27".

    Align = "center".

    headerText = "#{uiBundle.TEST} '"

    styleClass = "customcolheader" >

    < / af:column >


    Deployed to the app and navigated to the web page expecting to see the background of the column header color changes to red.

    No luck.


    I removed the qualifier (.customcolheader) and all the column headers in the corner of the Red application.

    AF | : column-to-head-cell {background-color: #FF0000 ;}}


    Only when I specify the name of the class and apply it to a specific column, it does not work.

    This happens on all 3 major browsers: IE, Firefox and Chrome.

    I find it very strange.


    JDeveloper version 11.1.1.5.0

    Version of CSS CSS Level 2 revision 1


    All entries will be appreciated.

    Thanks Shay.

    What you mentioned was infact my original code.

    I found the problem. The CSS was not the problem.

    To set the background color of a column heading, I was put in the name of the class under StyleClass for FY: column.

    Infact there is an attribute called "HeaderClass" to af:column and we need to set the name of the CSS class entry there.

    Works like a charm :-)

    Thanks for all the good entries.

  • Credit card details updated but still can't use the software?

    I can't use the software since I've updated since I've updated my credit card information after that that it has expired?

    To the link below, click on the still need help? option in the blue box below and choose the option to chat or by phone...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Creative cloud support (all creative cloud customer service problems)
    http://helpx.Adobe.com/x-productkb/global/service-CCM.html ( http://adobe.ly/19llvMN )

  • First group title below displays under the column headers using the model 23 classic report with the help of repeat titles on break

    Hello

    I am migrating an application from 3 APEX APEX 4.2 on a thing I noticed with the classic reports when I put them in the model 23, it's that the first section break has break notch under the headings of columns for this section of line while the remaining lines properly have it display above the headers on the subsequent sections of group.


    When I look at firebug code I saw that all the tables but the first, the break line is included in the last line of the previous table, so I can see how it did not work for the holidays since.

    I have tow questions.

    1. is it really intentional because it seems not terribly elegant and my users to zero immediately above as a perceived bug.

    2. is there a reasonable job around always use headers repeat on break? I have multiple reports on the same page in places so switch to interactive reports is not a quick fix for me in this case.

    Example of a question can be seen at apex.oracle.com at home

    Thank you

    Brad

    Roadling wrote:

    Hello

    I am migrating an application from 3 APEX APEX 4.2 on a thing I noticed with the classic reports when I put them in the model 23, it's that the first section break has break notch under the headings of columns for this section of line while the remaining lines properly have it display above the headers on the subsequent sections of group.

    1. is it really intentional because it seems not terribly elegant and my users to zero immediately above as a perceived bug.

    The Standard report template definition in issue 23 contains thead and tbody elements:

    Before the column header

    
    

    Column title template

    #COLUMN_HEADER#
    

    After the title column

    
    
    

    After the lines

    
    
    
    
    
    
    #PAGINATION#
    
    
    
    

    This is intentional, the best practice for marking up HTML tables. What is not expected is the problem that arises when this model is used with the break of repeat titles on break formatting option. The repeated headings result table consisting of soup of tags containing several poorly constructed tbody and thead, which is not valid elements.

    2. is there a reasonable job around always use headers repeat on break? I have multiple reports on the same page in places so switch to interactive reports is not a quick fix for me in this case.

    Create a copy of the report model Standard in Standard (break formatting) for use with reports of the break, remove the thead and tbody definitions of template tags and the breakdown of the reports to use the new model of change. (Or, if you use mainly break reports using the Standard template, keep the tags in the copy and remove them from the original in order to minimize the number of reports, you need to change.)

    Personally, I would create a report model of line custom to break complex reports in order to be able to have complete control over the structure and presentation.

Maybe you are looking for