Row with sum of column- how to?

Hallo,
i have a jspx-site with a table.
one of the columns help prices. about these column i want to show a row with the sum of the column. how can i do that.
any help is appreciated.

Hi,
See:
Displaying a total sum value in the af:table -> footer
Kuba

Similar Messages

  • How to reject external table rows with some blank columns

    How to reject external table rows with some blank columns
    I have an external table and I would like to reject rows when a number of fields are empty. Here are the details.
    CREATE TABLE EXTTAB (
    ID NUMBER(10),
    TSTAMP DATE,
    C1 NUMBER(5,0),
    C2 DATE,
    C3 FLOAT(126)
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EXT_DAT_DIR
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE
    LOAD WHEN (NOT (c1 = BLANKS AND c2 = BLANKS AND c3 = BLANKS))
    LOGFILE EXT_LOG_DIR:'exttab.log'
    BADFILE EXT_BAD_DIR:'exttab.bad'
    DISCARDFILE EXT_BAD_DIR:'exttab.dsc'
    FIELDS TERMINATED BY "|"
    LRTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL
    FIELDS (
    ID,
    TSTAMP DATE 'YYYYMMDDHH24MISS',
    C1,
    C2 DATE 'YYYYMMDDHH24MISS',
    C3
    ) LOCATION ('dummy.dat')
    REJECT LIMIT UNLIMITED
    So, as you can see from the LOAD WHEN clause, I'd like to reject rows when C1, C2 and C3 are empty.
    The above statement works fine and creates the table. However when I am trying to load data using it, the following error is produced:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "not": expecting one of: "double-quoted-string, identifier, (, number, single-quoted-string"
    KUP-01007: at line 1 column 41
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    It seems that external tables driver does not understand the "NOT (...)" condition. Could anyone suggest how I can achieve what I want in a different way?
    Thank you.
    Denis

    Another method would be to simply remove the "LOAD WHEN condition" and create a view on the external table which filters the data.
    CREATE EXTTAB_VIEW AS
    SELECT * FROM EXTTAB
    WHERE not (c1 is null and c2 is null and c3 is null);

  • Sum of Table column contents into a last row with respect to column

    In a WebDynpro for java application,
      Need to sum up all the table with respect to column, at the last Row of the table with respect to column.
    Only one table should be present for contents as well for the total.
    Please help me.
    Edited by: devender vadithyabadabath on Jan 12, 2008 11:54 AM

    Hi,
    you must add e last element at the end of you Nodeelements.
    I<yourNode>Node node1 = wdContext.node<;yourNode>;
    I<yourNode>Element element = node1.create<;yourNode>element.;
    Iterate over the your node element to build your sum of each and than add this sum to the last row of your table.
    element.set<;yourAttribute>(sum);
    node1.addElement(element);
    I hope this helps
    regards
    Gunter

  • Csv input adapter - read rows with different # of columns

    I have a csv file which includes rows with different number of columns. I want to read all the rows( of different # of cols)  into ONE stream only and then split into separate streams afterwards.
    I saw that CSV File Input Adapter does not add missing columns with nulls by default. Is it possible somehow? How can I generate a workaround?
    Thanks.

    Hello,
    The CSV Input Adapter expects to find a fixed number of fields.  If you attach the input adapter to a stream/window with 3 fields, it will always try to read three fields.  You can have missing data and this will be read into a column as a NULL value but the delimiters must still be there.  For example:
    1,1,1
    2,2,2
    3,3,3
    4,,4
    5,5,5
    CREATE INPUT WINDOW inWindow SCHEMA (c1 integer, c2 integer, c3 integer) PRIMARY KEY (c1);
    ATTACH INPUT ADAPTER File_Hadoop_CSV_Input2 TYPE toolkit_file_csv_input TO inWindow PROPERTIES csvExpectStreamNameOpcode = FALSE ,
      dir = 'c:/temp' ,
      file = 'test.csv' ,
      csvDelimiter = ',' ;
    A workaround you might consider is reading an entire line from your file into a stream with a single string column.  The trick is that you have to choose a character for the column delimiter that you are certain will never show up in your data.  Than once you have read that line into a stream, you can use the string functions to parse out the columns as needed:
    CREATE INPUT STREAM csv_instream SCHEMA (
      log_line_message string
    // Choose a character that is certain to never show up in the data in order to read the entire line
    // from the CSV file into a single column
    ATTACH INPUT ADAPTER File_Hadoop_CSV_Input1 TYPE toolkit_file_csv_input TO csv_instream PROPERTIES
      csvExpectStreamNameOpcode = FALSE ,
      dir = 'C:/temp' ,
      file = 'error_log' ,
      csvDelimiter = '@' ;
    // Parse out the individual columns
    CREATE OUTPUT STREAM csv_outstream SCHEMA (
      log_datetime timestamp ,
      debug_level string ,
      host string ,
      message string ) AS SELECT
      to_timestamp(substr(CI.log_line_message, 1, 24), 'DY MON DD HH24:MI:SS YYYY') as log_datetime,
      substr(CI.log_line_message, patindex(CI.log_line_message, '[', 2)+1, (patindex(CI.log_line_message, ']', 2) - patindex(CI.log_line_message, '[', 2))-1) AS debug_level,
      replace(substr(CI.log_line_message, patindex(CI.log_line_message, '[', 3)+1, (patindex(CI.log_line_message, ']', 3) - patindex(CI.log_line_message, '[', 3))-1), 'client ', '') AS host,
      substr(CI.log_line_message, patindex(CI.log_line_message, ']', 3)+1, 500) AS message
      FROM csv_instream CI
      WHERE CI.log_line_message IS NOT NULL;
    Thanks,
    Neal

  • Tabular Form based on table with lots of columns - how to avoid scrollbar?

    Hi everybody,
    I'm an old Forms and VERY new APEX user. My problem is the following: I have to migrate a form application to APEX.
    The form is based on a table with lots of columns. In Forms you can spread the data over different tab pages.
    How can I realize s.th similar in APEX? I definitely don't want to use a horizontal scroll bar...
    Thanks in advance
    Hilke

    If the primary key is created by the user themselves (which is not recommended, you should have another ID which the user sees which would be the varchar2 and keep the primary key as is, the user really shouldn't ever edit the primary key) then all you need to do is make sure that the table is not populated with a primary key in the wizard and then make sure that you cannot insert a null into your varchar primary key text field.
    IF you're doing it this way I would make a validation on the page which would run off a SQL Exists validation, something along the lines of
    SELECT <primary key column>
    FROM <your table>
    WHERE upper(<primary key column>) = upper(<text field containing user input>);
    and if it already exists, fire the validation claiming that it already exists and to come up with a new primary key.
    Like I said if you really should have a primary key which the database refers to each individual record itself and then have an almost pseudo-primary key that the user can use. For example in the table it would look like this:
    TABLE1
    table_id (this is the primary key which you should NOT change)
    user_table_id (this is the pretend primary key which the user can change)
    other_columns
    etc
    etc
    hope this helps in some way

  • Trying to display rows with sums and percents using filters

    Hello, I am working on a data sheet containing levels for students of 0, 1, 2, or 3 in different categories. I am trying to show totals and percents of these levels, while being able to filter out certain students based on gender, ethnicity, etc. Problem
    is when I filter, the rows showing my totals and percents disappear.
    For total number of level 3's in a column my formula looks like this: =SUMPRODUCT(SUBTOTAL(103,OFFSET(F6:F26,ROW(F6:F26)-ROW(F6),0,1)),--(F6:F26=3))
    For percent of level 3's I have: SUMPRODUCT(SUBTOTAL(103,OFFSET(F6:F26,ROW(F6:F26)-ROW(F6),0,1)),--(F6:F26=3))/SUM(F28:F31) 
    Percents and totals calculate fine. When I filter in the columns demonstrating demographics, which is columns B,C, D or E, the rows in which I calculate my totals and percents disappear. I also tried the number 3 instead of 103 after the SUBTOTAL function
    but same result. What am I doing wrong?

    Since you didn’t upload your excel file, I’m not quite sure what’s your source data looks like.
    I don’t think this issue is caused by your formula, but I guess you really need use number 3 instead of 103 in your SUBTOTAL formula.
    Anyway, please try below possible solutions for this issue.
    1. Set up your formula firstly, then filter data. Rather than the other way around.
    2. Select the filter range before filter. Or use advanced filter(except  the row which including your  formula)
    3. Copy the formula to the next row, then delete the pervious formula row.
    If it didn’t bring any joy. It’ll be better if you can share your workbook with us.

  • Delete duplicate rows -- based on 4 columns -- how?

    I asked this question on how to delete duplicates recently and received this suggestion which works well -- except --
    With CTE AS
    SELECT *, ROW_NUMBER() OVER (Partition by fld1 order by fld1) RowNum
    FROM #tmpA
    DELETE From CTE
    WHERE RowNum > 1
    -- the actual table I need to delete duplicate rows on is based on 4 columns.  The following table contains 14,462 rows of which 14,348 are distinct -- based on the following 4 colums.  Below is an image of a sample of the data contained in the
    table for my question and to the right of that data is the column structures (data types).  Is it possible to do something like the above example suggestion with the table in the image below?  How to do that?  I need to delete rows so that 14462
    goes down to 14348.  If I only reference one column for the delete -- this would delete like 7000+ rows.  I only need to remove 114 rows.
    Rich P

    Add the other 3 columns to the partition.
    Jason Long

  • ALV Sum N columns how to?

    Hi all,
    I'm doing a report on ABAP for a timesheet of the current month. The output i want is similar to this:
    Year      Month     Type         Item       #days  tue-1      wed-2    thu-3 ...
    2009     September  Project    Project1      3        1        1          1
    2009     September  Project    Projec2       5        1        1          0
    2009     September  Task       Task1         1        0        1          0
    The field #days is a sum of all the days columns for september next right to the #days column.
    I can have an SQL wich can extract all the data to fill year,month,type,item and #days. But then, i need to flat these #days in the correct days column. I think i can do it with 2 sqls, but then i need to join these data to display it right.
    Finally, present that data in an ALV.
    I have a structure defined in ABAP dictionary with all the static fields. The columns representing the days (sat-1,sun-2,...) are not in the structure.
    I've tried to define a new structure wich include the old one and define the remaining columns, but i can't show the fields defined in this extra structure, only the static fields defined in ABAP dictionary.
    This is probably simple, but i'm just starting in ABAP, and this seems odd and confusing right now.
    What's your advice to solve this problem?

    Hi vasanth,
    I'm trying to define my ALV from 2 structures.
    The YTS_REPORT_PROJ has year,month,type_item,item and #days
    The YTS_WEEK_DESC is a static structure with an interval of weekdays such as : saturday1,sunday1,monday1,...,saturday2,sunday2,... until i get the 31 days possibles to show for a month.
    I'm declaring this way:
      DATA: BEGIN OF IT_ALV_YTMSHT.
              INCLUDE STRUCTURE YTS_REPORT_PROJ.
              INCLUDE STRUCTURE YTS_WEEK_DESC.
      DATA: END OF IT_ALV_YTMSHT.
    For field catalogs i call this subrutine:
    *      Form  get_LayoutTable - Set Up Columns/Headers
    FORM GET_LAYOUTTABLE.
      DATA: LS_FCAT TYPE LVC_S_FCAT.
      REFRESH: FIELDCAT.  CLEAR: LS_FCAT.
      LS_FCAT-REPTEXT    = 'Year'.
      LS_FCAT-FIELDNAME  = 'YEAR_ITEM'.
      LS_FCAT-REF_TABLE  = 'IT_YTMSHEET'.
      LS_FCAT-OUTPUTLEN  = '4'.
      LS_FCAT-FIX_COLUMN = 'X'.
      LS_FCAT-COL_POS    = '1'.
      APPEND LS_FCAT TO FIELDCAT.  CLEAR: LS_FCAT.
      LS_FCAT-REPTEXT    = 'Month'.
      LS_FCAT-FIELDNAME  = 'MONTH_ITEM'.
      LS_FCAT-REF_TABLE  = 'IT_YTMSHEET'.
      LS_FCAT-OUTPUTLEN  = '6'.
      LS_FCAT-FIX_COLUMN = 'X'.
      LS_FCAT-COL_POS    = '2'.
      APPEND LS_FCAT TO FIELDCAT.  CLEAR: LS_FCAT.
      LS_FCAT-REPTEXT    = 'Type_of_item'.
      LS_FCAT-COLTEXT    = 'Type of item'.
      LS_FCAT-FIELDNAME  = 'TYPE_ITEM'.
      LS_FCAT-REF_TABLE  = 'IT_YTMSHEET'.
      LS_FCAT-FIX_COLUMN = 'X'.
      LS_FCAT-OUTPUTLEN  = '12'.
      LS_FCAT-COL_POS    = '4'.
      APPEND LS_FCAT TO FIELDCAT.  CLEAR: LS_FCAT.
      LS_FCAT-REPTEXT    = 'Item'.
      LS_FCAT-FIELDNAME  = 'ITEM'.
      LS_FCAT-REF_TABLE  = 'IT_YTMSHEET'.
      LS_FCAT-FIX_COLUMN = 'X'.
      LS_FCAT-OUTPUTLEN  = '20'.
      LS_FCAT-COL_POS    = '5'.
      APPEND LS_FCAT TO FIELDCAT.
      CLEAR: LS_FCAT.
      LS_FCAT-REPTEXT    = 'Number_of_days'.
      LS_FCAT-COLTEXT    = 'Days number'.
      LS_FCAT-FIELDNAME  = 'DAYS_ITEM'.
      LS_FCAT-REF_TABLE  = 'IT_YTMSHEET'.
    *  LS_FCAT-FIX_COLUMN = 'X'.
      LS_FCAT-OUTPUTLEN  = '11'.
      LS_FCAT-TOOLTIP    = '#Days=Hours/8'.
      LS_FCAT-COL_POS    = '6'.
      APPEND LS_FCAT TO FIELDCAT.
    DO 30 TIMES.
        CLEAR: LS_FCAT.
        LS_FCAT-REPTEXT    = 'day of week'.
        LS_FCAT-COLTEXT    = 'Day of week'.
        LS_FCAT-FIELDNAME    = ' '.             ----------> HOW CAN I REFERENCE HERE "SUNDAY1,SATURDAY1,..."?
        LS_FCAT-REF_TABLE  = 'IT_ALV_YTMSHT'.
    *  LS_FCAT-FIX_COLUMN = 'X'.
        LS_FCAT-OUTPUTLEN  = '11'.
        APPEND LS_FCAT TO FIELDCAT.
    As you can see, at the end of the routine i try to create 30 more columns, and those columns actually appear, but i don't know how to fill the data of those columns.
    To construct the ALV i'm using
    DATA: VARIAVEL LIKE IT_ALV_YTMSHT OCCURS 0 WITH HEADER LINE.
    *IT_YTMSHEET[] has the first part that i want to show (year,month,type,item and #days.
      VARIAVEL[] = IT_YTMSHEET[].
      CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IS_LAYOUT = GD_LAYOUT
          I_SAVE = 'A'
        CHANGING
          IT_FIELDCATALOG  = FIELDCAT[]
          IT_OUTTAB        = VARIAVEL[].

  • Input-Ready row with characteristic in column

    Hi,
    I have several workbooks based on queries with the property of having an Input-Ready row (context of integrated planning).
    These always worked fine, but after a bex upgrade only some of the queries continued to display the input-ready row at the bottom.
    A reason why only sometimes it works, has been asked to SAP.
    SAP refers to:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/f234619e3c4c5de10000000a155369/frameset.htm
    which says:
    You cannot use characteristics in the columns and can use one structure only.
    My queries mostly contain 0fiscper and 0amount in the columns.
    Following the above logic, the input-ready row never should appear since I display the amount over 12 months (=characteristic in column).
    BEx:
    Bi AddOn 7.X (based on 7.10)
    Support Package 8, Patch 1
    additional info:
    - All queries were designed in 7.x.
    - Same result in BEx Analyzer without using Workbook.
    Question:
    - What could be the reason that in some cases the input-ready row still appears, and in others not?
    - Any suggestions for workaround?
    Thx in advance!
    Rgds, Sam

    I beleive if you post it in "Business planing" queue you will get good response...
    Business Planning

  • With 'Revenue' Fact Column how can i calculate 'Previous 3 Months Revevue'

    Hi All ,
    i have a Column Called Revenue from Fact Table. i need to calculate Previous 3 Months Revevue
    How can i achive this ? please help me
    Thanks in advance

    Hi,
    Create one new logical coloumn bmm layer and
    1.Check Use existing logical columns as the source
    2.Click the Expression Builder button (three dots) to open the Expression Builder
    3.Select Functions > Time Series Functions > Ago.
    by using this u can create 3 months year ago revenue coloumn and use this coloumn in your formula
    hope this will help for you
    Naresh

  • How to select rows with Empty Column Entry

    I am trying to select all rows with an empty column
    select row1 from table where row2=' ';
    Any suggestions. I tried a space and no space in between the ''.

    An (theoretical) argument could be made that an empty string is not NULL (uknown), however Oracle's SQL and PL/SQL engines make no such distinction for VARCHAR2 and CHAR data types. As stated, you must use NULL as the comparison.
    Michael

  • Combining Multiple Rows into single row with multple columns

    Hi Experts,
    I have the following requirement, kindly help me.
    I have data in my table like below.
    ID NAME DEPT
    1 Sam 10
    1 Sam 20
    2 alex     30
    2 alex 40
    2 alex 50
    3 vinod 60
    3 vinod 70
    I want to show the same data into single row with dynamically generating columns for DEPT. I want show like below.
    ID NAME DEPT1 DEPT2 DEPT3
    1 Sam 10 20
    2 alex 30 40 50
    3 vinod 60 70
    It's urgent requirement, kindly help me.
    Thanks in advance.

    Right I've had my drink, so what was this "urgent" question then?
    798616 wrote:
    I have data in my table like below.
    ID NAME DEPT
    1 Sam 10
    1 Sam 20
    2 alex     30
    2 alex 40
    2 alex 50
    3 vinod 60
    3 vinod 70
    I want to show the same data into single row with dynamically generating columns for DEPT. I want show like below.Dynamic numbers of columns eh! Tricky.
    If you understand how SQL statements are executed it's along these lines...
    1. Open Cursor
    2. Parse SQL statement and determine columns
    3. Bind in any input values
    4. Fetch data
    5. Bind out values to columns
    6. Repeat step 3 until no more data
    7. Close cursor
    Now, you're expecting that you can determine the columns (step 2) from the fetched data (step 4 onwards). You can't. The SQL engine needs to know the expected columns before any data is fetched so, it can't base the number of columns on the data itself.
    If you need that requirement, you would need to query the data first and build up a dynamic query based on the data and then execute that dynamically built query to fetch the data and pivot it into those columns, which means that you have queried the data twice. Not good practice and not good (or simple) coding.
    What you're talking of doing is something that should be handled at the presentation/interface layer, not as part of the data fetch.
    Typically these sorts of things are handled most easily in report generation/writer tools such as Oracle Reports, Business Objects etc. where they fetch the data from the database and then process it to format it on the display, pivoting the results as required.
    It's not something that lends itself to be easily achieved in SQL. Yes, SQL can do pivoting of data quite easily, but NOT with a dynamic number of columns.
    If you were to specify that there is a maximum number of columns that you could get (rather than wanting it dynamic), then you can do it simply in SQL with the max-decode method...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select deptno, ename, row_number() over (partition by deptno order by ename) as rn from emp)
      2  --
      3  select deptno
      4        ,max(decode(rn,1,ename)) as ename1
      5        ,max(decode(rn,2,ename)) as ename2
      6        ,max(decode(rn,3,ename)) as ename3
      7        ,max(decode(rn,4,ename)) as ename4
      8        ,max(decode(rn,5,ename)) as ename5
      9        ,max(decode(rn,6,ename)) as ename6
    10        ,max(decode(rn,7,ename)) as ename7
    11        ,max(decode(rn,8,ename)) as ename8
    12        ,max(decode(rn,9,ename)) as ename9
    13        ,max(decode(rn,10,ename)) as ename10
    14  from t
    15  group by deptno
    16* order by deptno
    SQL> /
        DEPTNO ENAME1     ENAME2     ENAME3     ENAME4     ENAME5     ENAME6     ENAME7     ENAME8     ENAME9     ENAME10
            10 CLARK      KING       MILLER
            20 ADAMS      FORD       JONES      SCOTT      SMITH
            30 ALLEN      BLAKE      JAMES      MARTIN     TURNER     WARD
    SQL>

  • Algning new folder with other data columns in a document library

    Hi All,
    I have created an InfoPath form that used to create a new form & a new document library and the description to that folder.
    Now my InfoPath form has some text boxes to store data. Also there is an attachment control to upload documents. These documents should be uploaded to the newly created folder.
    The new folder should display at the document library as in the same row with other data columns that were inserted to the data library. I have the problem with the new folder aligning in the same row with other data.
    So if someone can know how to solve this matter please enlighten me.
    Thank You,
    Chiranthaka.

    Can you provide more detail on what exactly you need to achieve and how your system is functioning at the moment? It sounds like you have an Infopath form that can have documents attached to it, you then store these documents into a new folder and wish to
    have the folder represented in the list view for the form in the form library you are using?

  • Updating multiple rows with different values

    Hi!
    I have a problem. I need to update more then 1000 rows with different values. How can I do it?
    For exsample i have table:
    id; color, date,
    1 red
    2 green
    3 white
    I need to update date field.
    Update table
    set date='01.02.03'
    where id=1
    Update table
    set date='01.03.03'
    where id=2
    Maybe there is way how to update multiple rows at one query?
    Sorry for my bad english.
    Thanks!

    Hi,
    You can try this
    UPDATE TABLE SET DATE = CASE
                        WHEN ID = 1 THEN TO_DATE('01-02-03','DD-MM-RR')
                        WHEN ID = 2 THEN TO_DATE('01-03-03','DD-MM-RR')
                        ENDcheers
    VT

  • How to validate if a column have NULL value, dont show a row with MDX

    Hello,
    I have this situation, I have a Result from MDX that return rows with values NULL on columns, I tried with NON EMPTY and NONEMPTY but the result is the same. That I want to do is validate if a column have a Null value discard the row, but I dont know how
    to implement it, could somebody help me?, please.
    Thanks a lot.
    Sukey Nakasima
    Sukey Nakasima

    Hello,
    I found the answer in this link https://social.technet.microsoft.com/Forums/sqlserver/en-US/f9c02ce3-96b2-4cd6-921f-3679eb22d790/dont-want-to-cross-join-with-null-values-in-mdx?forum=sqlanalysisservices
    Thanks a lot.
    Sukey Nakasima
    Sukey Nakasima

Maybe you are looking for

  • HT4623 my ipod is stuck on 4.2.1 and wont let me download any apps or anything please help

    i tryed going to itunes and it didnt work said it was up to date and its 2n gen i belive and i just need to know if their is a way i can actually have apps on this or just throw it away?????

  • Help creating an external array for a scoreboard

    I'm trying to create an array in an external file that will recieve and arrange scores sent from Quiz.fla upon clicking the submit score button.  I also want another fla file to be able to reference this external array and pull the top 15 scores from

  • NRL stream looping back 3 to 5 seconds every 30 seconds

    Your service is rubbish! Every 30 seconds or so it loops back 3 to 5 seconds. No one can watch a game with this rubbish! Every Saturday games for the last four weeks we try to watch the game via the match centre on laptop. We have high speed nbn broa

  • Error in ebs

    Hi Experts. For electronic bank statement,Now I've done all the config work when I try to import the file FF_5 (RFEBKA00), I got an error Termination in statement no 00000 of acct closing record 62F missing Message no. FV151 thank you Regards Sreedha

  • Dymanic mic in 1/4" line2 input not workking?

    I'm using? a Audigy 2ZS Platinum which came with Cubasis VST 4.0, FL Studio 4, and Wavelab lite. My system is a Opteron 2.0? with 2 gig ram and windows xp. I'm trying to record from a dymanic mic plugged into the front panel /4" line2 and I can't fig