Multiplication of two columns in a row

Hi All,
I have created an advanced table. In this table i am having 'price' and 'quantity' columns. i want to multiply these two columns and display result in 'amount' column in the same row.
Please let me know how can i approach this..
Regards,
Murali

Hi,
Since Quantity , Price are entered at run time the third column Amount can be calculated only when the request to the server is made.
Now enable PPR on the Price column , You can do this by setting the property ClientAction Action Type : FirePartialAction in the property inspector of the jdeveloper.
Also give the event name as AmountUpdate.
Then in the processFormRequest stage of the controller, check for the event AmountUpdate.If it is then get a handle to the row reference using pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE).This will give a key that can be used to retrieve the row access.Now find this row from the ViewObject.
Get the Quantity and price using row.getAttribute(ViewAttribute coresponding to Quantity ) .
Set the VO attribute related to the Amount .
So when the user tabs out of price field the amount field will be popluated thorugh PPR.
Regards,
Guru Krishnan V.

Similar Messages

  • Update multiple rows based on two columns in same row

    I have a 1000 rows in a table I would like to update with a unique value. This unique value is a cocatenation of two columns in teh same row.
    Each row has a (i) date and a (ii) time and a (iii) date_time column. I would like to update the date_time (iii) column with a cocatenation of the (i) date and (ii) time columns.
    I know how I would update a single row but how can I update multiple rows with a cocatenation of each of the two columns - i.e put a different value into the date_time column for each row?

    this?
    update table tab_name
    set date_time =date||time
    where your_condition

  • Merging two columns with muliple rows in Numbers '09

    I am trying to merge two columns each with 100 rows and related data. Column one is the street address and column two have office numbers. The final result would be one column with 100 rows with address and office numbers.
    Ed Carreon

    sanpanza wrote:
    I am trying to merge two columns each with 100 rows and related data. Column one is the street address and column two have office numbers. The final result would be one column with 100 rows with address and office numbers.
    Ed Carreon
    Hi Ed,
    Use the CONCATENATE() function.
    Street address in column D, Office number in Column E
    100 Smith ST            212
    Formula: =CONCATENATE(E," ",D)
    Result:
    212 100 Smith ST
    Note the formula has three arguments, the reference to column E, a text literal (" ") containing a single space, and a reference to column D.
    Regards,
    Barry

  • Merge Two Rows of a table to One row but into two columns

    Hi
    I Am struck in writing a query to merge two rows into two columns of one row.
    Here is the Sample data i am working with,
    Col 1     Col 2     Col3 Col4 Col Col6
    5000     573-3000 2     0     Phone      
    5000     573-3036 1     0          Fax
    5000     893-5703 3     0     WOrk      
    3000     232-5656     1     0     Phone     
    3000     353-5656     2     0          FAx
    Here Col,Col3,Col4 form the Key.
    now wht i am trying to do is to Merge these type of rows put them into Columns P,F,W,E respectively to achive a Structure as below
    Col1      P     F     W
    5000     573-3000      573-3036      893-5703
    3000     232-5656     353-5656     
    Can you please help me how could i do this.
    I am pretty ordinary at writing SQL's.
    Thanks a Lot in Advance
    Message was edited by:
    Sreebhushan

    Search the forum for PIVOT and you'll find plenty of examples.

  • How to define form within a table with two columns?

    Hallo,
    i want to design a form with two columns side by side.
    My way is to define a table within the form:
    <af:panelForm>
    <afh:tableLayout width="100%">
    <afh:rowLayout halign="left">
    <af:inputText value="#{bindings.StsNr.inputValue}"
    label="#{bindings.StsNr.label}"
    required="#{bindings.StsNr.mandatory}"
    columns="#{bindings.StsNr.displayWidth}"
    readOnly="true">
    <af:validator binding="#{bindings.StsNr.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.StsNr.format}"/>
    </af:inputText>
    <af:selectOneChoice value="#{bindings.StammsaetzeStsEmpfangsart.inputValue}"
    label="#{bindings.StammsaetzeStsEmpfangsart.label}"
    tip="Brief, Fax, Mail">
    <f:selectItems value="#{bindings.StammsaetzeStsEmpfangsart.items}"/>
    </af:selectOneChoice>
    </afh:rowLayout>
    </afh:tableLayout>
    </af:panelForm>
    Is there a better way to do it?

    Hi reiasmus ,
    Try <af:panelForm row="X">, that specifies the number of fields by columns. If you have ten fields and you fix row="5", you will obtain two columns with 5 rows on each.
    Regards,
    Tif

  • How can I create 25 charts on a page, each chart 2 columns and 10 rows

    I need to create a chart that has 25 tables. 5 tables in 5 columns. Each table has 2 columns and 10 rows. I know it can fit all on 1 page as I have seen it done but I can not figure out how

    I had some initial difficulty understanding your question. In Numbers, a "chart" is a graph.
    You want to create a 5 x 5 array of tables, each with two columns and 10 rows, placed on a single page.
    At the default size, each cell on a new Table is 1 inch wide and 0.2 inches high. So without displaying a title, each of your 25 charts would occupy a two inch square space.
    Butted closely together, that's a space that is 10 inches wide by 10 inches high.
    On a machine set to US localization,the default page size is US Letter, placed in Landscape orientation. Left, right and top margins are set to 0.75", bottom margin is 0.5", and there is a 0.25" height reserved for page header and page footer.
    That leaves a working space that's 9.5" wide and 6.75" high.
    Obviously, some adjustments will be needed.
    0.2" is pretty much the minimum for row height. You can go smaller by typing in a smaller height in the Table Inspector, but even with 9 point type, you begin to lose the descenders on ps and qs. Go with 0.2, then use the slider in Print view to further shrink the content.
    If you can narrow the columns significantly (to 0.75" or less), then go to Page setup and change to Portrait orientation.
    In the Sheet Inspector, decrease all margins to 0.5", and the header and footer spaces to 0. Set page orientation to Portrait.
    Now consider the Table(s). If you've opened a new, blank document, you'll have a multi column, multi row table with one header row and one header column. If you don't need the header row and header column, delete them (column A, Row 1) right away.
    Reduce the number of rows to 10 and the number of columns to 2. Select the whole table and, in the Table inspector, set the row height to 0.16" and the row width to 0.73".
    With the table still selected. press command-D four times to create four duplicate tables.
    Go View > Show Rulers, then View > Show Print View. go back to the Table Inspector and use the slider to set Content Scale to about 94%.
    Drag the still selected Table to the right margin of the page. Press command-A to Select All.
    Go Arrange > Align > Top
    Go Arrange > Distribute Space > Horizontal.
    With all five tables still selected, press command-D to duplicate the set.
    Hold down the Shift key and press the left arrow once, then the down arrow 14 times. This should bring the new row of tables into line with the previous ones, and move them down the page to just below the first row of tables. If fine adjustment is needed, use the arrow keys with the shift key released.
    Repeat three more times to add another three rows of tables.
    Adjust the spacing between tables as necessary.
    Regards,
    Barry

  • Every two charater of a column into a row

    Hello everyone,
    I am trying to convert every two characters of a column into a row.
    Something like...
    with t as
    SELECT
              '00112233445566778899' TN
                 FROM dual
    --union all
    --select 'xxyyzzaabbccddeeffgg' from
    --dual
    SELECT SUBSTR 
             ( tn 
             , decode(n,0,0,(((n*2)+1)-2))
             , 2
             ) AS token  ,n
        FROM ( select * from t
           , ( SELECT LEVEL n
                 FROM (SELECT length(tn)/2 max_elements FROM t)
              CONNECT BY LEVEL <= max_elements +30
       WHERE n <= LENGTH(tn) /2
    TO          N
    00          1
    11          2
    22          3
    33          4
    44          5
    55          6
    66          7
    77          8
    88          9
    99         10The above query fails when I try to do it for multiple rows(It goes in an infinite loop).
    Is there a way to convert ever two characters of a column into a row.
    I am using Oracle 9i.
    Thanks in Advance,
    Jaggyam

    jaggyam wrote:
    Note : I am using 9i.It's usually a good idea to mention that at the beginning otherwise we have to assume you are using the latest/supported versions of oracle.
    Does this work in 9i.... (I don't have an old version to try it on)
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select '00112233445566778899' as txt from dual union all
      2             select 'aabbccddeeff' from dual)
      3      ,m as (select max(length(txt)/2) mx from t)
      4  --
      5  select txt
      6  from (
      7    select substr(txt, ((rn-1)*2)+1, 2) as txt
      8    from t, (select rownum rn from m connect by rownum <= mx)
      9    )
    10* where txt is not null
    SQL> /
    TX
    00
    aa
    11
    bb
    22
    cc
    33
    dd
    44
    ee
    55
    ff
    66
    77
    88
    99
    16 rows selected.
    SQL>

  • Multiple values from same column in diffetent columns in same row??

    Hi all,
    I am wondering how you can display different values from the same column into different columns on same row. For example using a CASE statement I can:
    CASE WHEN CODE IN ('1', '3') THEN COUNT( ID) END as "Y"
    CASE WHEN CODE NOT IN ('1', 'M') THEN COUNT( ID) END as "N"
    Yes this will produce two columns needed but will also produce two separate records and null values for the empty's.
    Any ideas?
    Thanks

    It's not clear what you want.
    Can you post some examples as described in the FAQ: {message:id=9360002}
    As my first guess, I would think you're looking for something like...
    SQL> select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE                    SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980 00:00:00        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-1981 00:00:00       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-1981 00:00:00       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-1981 00:00:00       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-1981 00:00:00       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-1981 00:00:00       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-1981 00:00:00       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-1987 00:00:00       3000                    20
          7839 KING       PRESIDENT            17-NOV-1981 00:00:00       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-1981 00:00:00       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-1987 00:00:00       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-1981 00:00:00        950                    30
          7902 FORD       ANALYST         7566 03-DEC-1981 00:00:00       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-1982 00:00:00       1300                    10
    14 rows selected.
    SQL> select count(case when deptno in (10,20) then deptno end) as deptno_10_20
      2        ,count(case when deptno > 20 then deptno end) as deptno_30plus
      3  from emp;
    DEPTNO_10_20 DEPTNO_30PLUS
               8             6

  • BC4J Objects with PKs based on two columns using multiple sequences

    I have implemented a BC4J object that is based on a DB table that has two columns as the primary key. For example Table A's primary key is Group and ID and there is a DB sequence for each Group.
    I use the BC4J object using servlets and JSPs and I have been able to implement an Update form.
    I now want to implement a Create (New) form. I've read forum postings and info on the help regarding using the SequenceImpl class to override the EntityImpl object's create method as shown below:
    protected void create(AttributeList attributeList)
    super.create(attributeList);
    SequenceImpl mySeq = new SequenceImpl("MY_SEQ",getDBTransaction());
    setMyObjectId(mySeq.getSequenceNumber());
    But as you can see I need to know the value of the group attribute before I can get the next value sequence:
    For new EO belonging in Group1 I need sequence from "GROUP1_SEQ", Group 2 from "GROUP2_SEQ", etc.
    I would like to put this code in the Entity Object where it belongs. I guess my problem is simply how to create a new row in the View Object with a passed parameter which is the value of Group.
    Thanks in advance!

    Angelo:
    How is the EO suppose to receive the group id? Is it from the view row? If so, the VO can pass that group id to the EO through the attribute list and calling the
    public Row createAndInitRow(AttributeList nvp);
    API.
    Example code would be:
    ViewObject myVO;
    // myVO is initialized
    AttributeList nvp = new oracle.jbo.NameValuePairs();
    // GroupID is the attr name of the Group ID
    nvp.setAttribute("GroupID", <some-value>);
    Row row = myVO.createAndInitRow(nvp);
    If you do that the create(AttributeList attributeList) method of the EO will receive the GroupID value coming from the VO.
    Then, you can use that for your sequence.
    Thanks.
    Sung

  • Table with a sub-heading row - under only two columns

    Hi all,
    Using TCS2 on Win 7 64-bit. This is likely a silly question but I can't for the life of me figure it out.
    I want to create a table as follows:
    -one table, with 4 columns and 5 rows
    -i would like the header row to span all 4 columns, but only be divided into 3 pieces, so that in the first row beneath the header, I can further sub-divide the farthest 2 right-columns
    I've attached a little screen diagram to try and give a sense of what I'm looking to do.
    I'm sure this is a simple thing but I just can't figure it out!
    Any help is greatly appreciated.
    Thanks,
    Adriana

    adrianaharper wrote:
    Hi all,
    Using TCS2 on Win 7 64-bit. This is likely a silly question but I can't for the life of me figure it out.
    I want to create a table as follows:
    -one table, with 4 columns and 5 rows
    -i would like the header row to span all 4 columns, but only be divided into 3 pieces, so that in the first row beneath the header, I can further sub-divide the farthest 2 right-columns
    I've attached a little screen diagram to try and give a sense of what I'm looking to do.
    I'm sure this is a simple thing but I just can't figure it out!
    Any help is greatly appreciated.
    Thanks,
    Adriana
    Select the two right-most cells in the top header row and choose Table > Straddle.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How to relate two columns in a same row

    I want to relate two columns in a same row, like if A2 is Jack then B2 to be A, if A2 is Anand then B2 to be B, If A2 is Arun then B2 to be C and so on. How to do it?

    Anand,
    Create a table that lists the relationships:
    Name
    Associated Letter
    Jack
    A
    Anand
    B
    Arun
    C
    Then, use a Lookup function to find the name in the lookup table and return the proper letter to your main table.
    Jerry

  • Unique row based on two columns and single column

    Dear Members,
    I have a table which contains duplicate rows, for which a query should be able to fetch the unique row from the table. Here the unique is not based on one column, but it should be on two columns and also check for uniqueness on one column.
    create table addr ( firstname varchar2(10), lastname varchar2(10), area varchar2(3));
    insert into addr values('bob', 'james', '1');
    insert into addr values('bob', 'james', '1');
    insert into addr values('harry', 'bert', '1');
    insert into addr values('jimmy', 'bert', '1');
    insert into addr values('sam', 'mac', '1');
    insert into addr values('sam', 'knight', '1');
    insert into addr values('tom', 'sand', '1');
    insert into addr values('cat', 'mud', '1');
    The output of query should contain 3 rows.
    bob - james
    harry - bert or jimmy - bert [ either one of them, but not both ]
    sam - mac or sam - knight [ either one of them, but not both ]
    tom - sand
    cat - mud
    SELECT firstname, lastname as total from addr WHERE area = '1' GROUP by firstname,lastname; This does not take of single column duplication..
    Any suggestions..

    SQL> with t_data
    as
    select 'bob' as firstname, 'james' as lastname, '1' as area from dual union all
    select 'bob', 'james', '1' from dual union all
    select 'harry', 'bert', '1' from dual union all
    select 'jimmy', 'bert', '1' from dual union all
    select 'sam', 'mac', '1' from dual union all
    select 'sam', 'knight', '1' from dual union all
    select 'tom', 'sand', '1' from dual union all
    select 'cat', 'mud', '1' from dual
    SELECT
            firstname,
            lastname,
            area
    FROM
                    SELECT
                            t.*,
                            row_number() over(partition BY firstname order by 1) rn,
                            row_number() over(partition BY lastname order by 1) rn1
                    FROM
                            t_data t
    WHERE
            rn     = 1
    AND rn1 =1 ; 
    FIRSTNAME       LASTNAME        AREA
    bob             james           1
    cat             mud             1
    jimmy           bert            1
    sam             knight          1
    tom             sand            1
    SQL>

  • Show Rows Where Two Columns have Same Data

    Hello,
    I have a spreadsheet that I need to sort by showing me all the rows where the data is equal between two columns.
    I.E. I have a column called Last Name and I have another column, U, with some of those Last Names, I want to sort the spreadsheet to show me only the rows that match up with the same Last Name in coumn a and U.
    Thanks for any help.
    L

    To sort the table:
    Add two columns to the table. For this discussion, I'll refer to them as columns AA and AB.
    In AA2, enter: =ROW()
    Fill to the bottom of the table. With all f these cells selected, Copy, then Edit > Paste Values.
    This gives you a column you can sort by to restore the original order of the table.
    In AB2, enter: =IF(A=U,U," ") using option-space between the double quotes.
    Visually, this will repeat the duplicated names once more in column AB.
    An ascending sort on column AB will bring all rows with duplicate data in columns A and U to the top of the table.
    For greater visibility You might also add a conditional format rule to all of column AB, as I've done here for column D:
    The box to the right of "Text doesn't contain" contains a single 'option-space' character. The ascending sort (on column D) has not yet been done.
    Regards,
    Barry

  • Setting different Tabel Cell SemanticColor for Multiple Columns of each row

    Hi,
    I have requirement of setting different colors to different columns for each row based on some condition in table data.
    The data to table is coming from model, hence table is mapped to model node and attributes.
    I have created Seperate Node CellColorNode with attribue CellClr1 and CellClr2 of type TextView Semantic Color.
    Set the calculated, read only attribute to True. Mapped table columns text view to the CellColorNode->CellClr1 and CellColorNode-->CellClr2 correspondingly.
    Now, my query is how do i set the colors to CellClr1 and CellClr2 attributes. As I need to set the color for multiple columns of each table row.
    Is it in method getColorCellCellClr generated? Any  Example Code?

    Its resolved by following below link
    http://scn.sap.com/thread/158286

  • Multiple columns with uneven rows

    Good Evening Everybody
    Could somebody advise me on the best solution to do the following.
    I have a csv file. The csv file is being read using "read from spreadsheet file" vi.
    The file contains multiple columns. The columns all have a different last row address. By this I mean that...say...the last row of column 1 is 5. Column 2 last row is 23, Column 3 last row is 12. etc. The file might look like the following...note...this is an example of a file only, and any implications can't be construed.
                Column1    Column2    Column3    Column4     Column5
    Row1        0               1                 2             3                 4
    Row2       12             23              13            34                 0
    Row3       11             44              23                               11
    Row4       34             55            
    Row5       21           
    Lets assume that the value(s) of interest are contained in columns 2,4 and 5. Therefore the values I want to extract would be 55, 34 and 11
    I can select the columns of interest fine, but am having difficulty working out how to find the last row for these columns
    Caveats:
    1. The number of columns changes
    2. Position of column in file changes address...never found in same address
    Does anybody know how I might be able to locate the last row in the column of my choosing.
    Thanks for any assistance.
    best regards
    Ray

    Hi Ray,
    load the csv as an array of strings. Empty cells will result in empty strings. So you can easily test each column for an empty item, which will mark the "End of Data"...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • Which iDOC Type for Credit/Debit notes generated from SD Module ?

    Hi, We are implementing an EDI Solution for SD Invoices which would involve sending EDIFACT Messages generated out of mapping the SAP iDOC TYPE INVOIC02 to the EDIFACT fields. We also have to send Credit and Debit Notes generated from SAP in the SD M

  • ZENworks Database and Primary Servers / Scheduled Reboot

    Hi all, I hope I got the correct forum for my questions. If not could an admin be so good to move me to the correct one? We've got a ZENworks 11.3.1 Zone with 4 Primary Severs (SLES 11SP3) and up to 25 Satellites (mixed OS). The Databases are on MS S

  • LOCPT and LOCSL not filled even though partner function maintained

    Hi, In a nomination, I have the problem that the field LOCPT and LOCSL are not filled for one specific plant location even though I have created the in TC O4TQ for the plant and storage location. I have checked the specific developments in Z_OIJ_NOM_

  • Skype How-To video ads

    Help in banner ads. Seriously? I have been using skype since way before Microsoft owned it. Y'know, back when it was good and MS wasn't determined to kill it stone dead by trying to make it "trendy" and in the process accidentally making it unusable.

  • Solution Manager version 3.2_sp 10

    Hello We are using SOLMAN for monitoring and after upgrade one of the our monitoring system there was some problem with monitoring, so we decided at the SESSION COMPONENTS click at RE-INITIALIZE and problem was solved. As we know RE-INITIALIZE delete