Totaling specific value within data

I have data that contains a bunch of "Y" (yes) and "N" (no) values. I want to total up only the "Y" values. The only way I have found so far is build another column with 1's and 0's, then sum that column, but that looks goofy. Any ideas? I cant seem to "edit" the totals to the extent of adding a decode function or something to limit the count just to "Y".
Thanks,
CC

I have data that contains a bunch of "Y" (yes) and "N" (no) values. I want to total up only the "Y" values. The only way I have found so far is build another column with 1's and 0's, then sum that column, but that looks goofy. Any ideas? I cant seem to "edit" the totals to the extent of adding a decode function or something to limit the count just to "Y".
Thanks,
CC

Similar Messages

  • HTML Dataset - how to filter based on data values within columns

    I have had success with using the XML dataset and filtering based on user input (see javascript example below)
    <script type="text/javascript">     
    var ds2 = new Spry.Data.XMLDataSet("disciplinary_actions3.xml", "doh/disciplinary_actions2[type='<? echo($type) ?>'][name>='<? echo($name) ?>']");
    ds2.setColumnType("date-of-sanction", "date");
    </script>
    The XML dataset filters the results based on the type and name values within the XML dataset columns.
    I need to accomplish this type of filtering with an HTML table.  All that I have  been able to accomplish with the use of the in the rowselector (see example below)
    <script type="text/javascript">
    <!--  the setRowSelector filters by the class attribute on the row in the html table
    var ds4 = new Spry.Data.HTMLDataSet("disciplinary_physicians_htmldataset.php", "physician-list");
    ds4.setRowSelector("tr.<? echo($type) ?>");
    ds4.loadData();
    //-->
    </script>
    How can I filter the HTML dataset based on the data VALUES within the table columns and NOT the class or id or span or div,,,etc?
    Although my advanced dataselector within Dreamweaver CS4 has a column selector... I can't under or get it to work.
    Any assistance or direction is greatly appreciated.

    Hi Ron,
    According to your description, you want to pass the Terminal number that user logon to where clause without needing to create a userid table, right?
    As per my understanding, you need to add an additional table to store the user and corresponding terminal, so that you can filter the data to show the rows based on the user and corresponding terminal. Here are some blogs which describe dynamic security
    on tabular model, please see:
    http://blogs.msdn.com/b/himanshu1/archive/2013/03/02/implementing-dynamic-security-in-tabular-models.aspx
    http://www.bidn.com/blogs/ChrisSchmidt/ssas/4332/dynamic-security-in-tabular
    If this is not what you want, there is no other approach to pass the Terminal number that user logon to where clause without needing to create a userid table. Thank you for your understanding.
    Regards,
    Charlie Liao
    TechNet Community Support

  • What is the best way to update /101 Total Gross YTD values within CRT

    Hello - Can someone please suggest the best way that I can update the current /101 YTD values within the CRT?  We had a conversion effort take place earlier in the year that did not accumulate the amounts of one particular wage type to the /101 bucket.  The wage type itself is currently in the CRT with the appropriate accumulators set up correctly but the /101 YTD values are too low due to the missing amounts.  Any suggestions would be greatly appreciated.
    Thanks!

    Hello Kristy,
    Did you try RPUCRT00? This program is for Recreation of Payroll Cumulation tables and might help in this case.
    Hopefully this information helps.
    Kind regards,
    Graziela Dondoni

  • Discount on Total Order Value

    Hi everybody ,
    We need the Discount to be calculated automatically on the Total Order Value.
    Its a promotion.
    Useful suggestions will be rewarded.
    Thanks
    Kartik

    Hi pls follow the procedure below, Hope it will help u out
    VOFM: ON PRICING
    This note is an explanation of function "Maintain: Requirements and Formulas", which is also known as "VOFM".
    By using descriptions and examples, this note explains how the VOFM function works in the R/3 Standard System, which objects are related to it and which restrictions exist.
    Chapter 2.7 explains possible causes of errors and solutions for problems with the VOFM function.
    To provide a good overview, this note is subdivided into the following sub areas:
    1. General information
    1.1 Definition of terms
    1.2 Application areas
    1.3 A frank word on the "source code responsibility"
    2. Technology
    2.1 Introduction
    2.2 Namespaces
    2.2.1 SSCR object registration
    2.3 Structure of a VOFM object
    2.3.1 Include file with ABAP form routine
    2.3.2 Table entries in TFRM and TFRMT
    2.4 Calling VOFM objects
    2.4.1 VOFM object carrier
    2.5 Activation, generation and RV80HGEN
    2.6 Transport
    2.7 FAQs: Possible causes of errors and problems
    Technical field names are displayed in angle brackets [].
    Note that this note only explains the mode of operation of the VOFM in an R/3 Standard Core System.
    For R/3 industry solutions or Add-Ons the VOFM function displays a different behavior in subareas, however, this is not dealt with in this note.
    Additional key words
    VOFM, SAPMV80H, TFRM, TFRMT, RV80HGEN, XPRA, formulas, requirements, data transport routine, copy routine, data transfer.
    Cause and prerequisites
    1. General information
    1.1 Definition of terms
    Depending on the business processes used it may be necessary to influence the standard behavior of R/3 applications. For that purpose the VOFM function provides a corresponding environment in order to be able to develop and manage customer-specific logic simply.
    The system stores the objects generated via the VOFM in the Customizing of the respective application area
    (Pricing, message determination and so on) and its programs call the objects correspondingly.
    Also SAP delivers certain functions in the form of VOFM objects.
    Consequently, the VOFM is an exit technology as explained in more detail in Note 381348.
    1.2 Application areas
    Typical VOFM objects are requirements, formulas and data transfer routines.
    These are used in processes of the purchase order, the delivery, billing, price determination, material determination, message determination, the free goods, the pricing and of others.
    In the entries of the R/3 core menu of Transaction VOFM you can find a precise overview of the supported application areas.
    1.3 A frank word on the "source code responsibility"
    As in user exits, in VOFM objects are many fields and tables available. Thus, the use of VOFM objects is very versatile and consequently also very critical under certain circumstances. For the use of "customer-specific" VOFM objects the statements in Note 381348 regarding the responsibility for customer enhancements (Maintenance responsibility, problems during the upgrade and so on) apply. Read this note carefully before you decide on the use of customer-specific VOFM objects.
    Errors and data inconsistencies that are caused by improper application or implementation of VOFM objects are not processed by the SAP Support but exclusively within the framework of the Consulting that has to be purchased separately.
    2. Technology
    2.1 Introduction
    A VOFM object is uniquely defined via characteristics "group indicator" [GRPZE] and "group number" [GRPNO].
    Here the group indicator, technically represented by a character field of length 4, is the logical connection to the calling environment.
    Examples:
    ABED copying requirement in the order
    ADAT data transfer in the order
    PBED requirements pricing
    CASC Data transfer for sales activities
    PBEK requirements account determination
    CHRG requirements batches
    REAK archiving for orders
    VFCL Multi-dimensional scales
    You can find all defined group indicators in the allowed values of the "GRPZE" domain in the ABAP Dictionary (Transaction SE11).
    The group number can have a value from 1 to 999.
    Exceptions are group indicators "PSTK" (= group key routine pricing) and "TDAT" (= data transfer for texts). For these the system can only assign group numbers from 1 to 99.
    2.2 Namespaces
    The VOFM has separate number ranges in order to distinguish VOFM objects delivered by SAP from customer-specific VOFM objects. These number ranges are often also called "VOFM namespaces".
    However, note that this is not a "real namespace" that is protected by corresponding entries in system table "TRESC" (= reserved names for Customizing tables and Customizing objects).
    Instead, only the VOFM logic itself does the definition and check of the number ranges.
    The following list displays the customer number ranges sorted according to group indicators:
    Indicator     Name     Number range customer
    FOFU     Subsequent functions     900 - 999
    PSTK     Group key routines     50 - 99
    TDAT     Data transfer routines f. texts     50 - 99
    all other group indicators           600 - 999
    In Note 356737 you can find more information on the available VOFM number ranges.
    2.2.1 SSCR object registration
    VOFM objects are subject to SSCR registration (= SAP Software Change Registration).
    The reason for that is the necessity that every VOFM object is physically assigned to that SAP development class, from whose programs a corresponding jump into the VOFM object later occurs.
    If you use the VOFM interface the system makes the assignment automatically. An assignment of customer-specific development classes is not possible.
    2.3 Structure of a VOFM object
    A VOFM object consists of the following parts:
    Include file with ABAP form routine
    TFRM table entry
    TFRMT table entry
    2.3.1 Include file with ABAP form routine
    In the ABAP form routine the desired function is programmed.
    Example pricing value formula number 001:
    Include name : FV64A001
    Form routine : FRM_KONDI_WERT_001
    Implementation: * * Profit margin considering rebate agreements
    form frm_kondi_wert_001.
    xkwert = komp-kzwi3 - komp-wavwr.
    endform.
    Dependending on the selected group indicator, the group number and the system type (SAP or customer system), the system assigns and generates the include name and form routine name automatically.
    For this reason, standard routines delivered by SAP generally have a different structure of the include name than customer-specific routines.
    Example:
    SAP standard value formula for the pricing
    => prefix FV64A + object number with 3 places from 'SAP namespace'
    => for example FV64A001
    Customer-specific value formula for the pricing
    => prefix RV64A + object number with 3 places from 'customer namespace'
    => for example RV64A905
    2.3.2 Table entries in TFRM and TFRMT
    The entries in tables TFRM and TFRMT belonging to a VOFM object are used for the status management and assignment. The system always analyzes them if the user calls Transaction VOFM or if a generation operation occurs (for details refer to section 2.5).
    The system generates exactly one TFRM table entry per VOFM OBjekt. In this TFRM entry the following information is stored:
    Group indicator     GRPZE
    Group number     GRPNO
    Routine 'active' indicator     AKTIV_TFRM
    Application     KAPPL
    Date of the last generation     GNDAT
    Time of the last generation     GNZEI
    Examples:
    GRPZE     GRPNE     AKTIV_TFRM     KAPPL     GNDAT     GNZEI
    PBED     001     X     V     06 13 2001     09 06 39
    TDAT     001     X           06 13 2001     09 06 39
    CHRG     003     X           06 13 2001     09 06 39
    The meaning of group indicators and group numbers has already been dealt with.
    The 'active indicator' controls whether a VOFM object is 'active' or 'inactive'. Active VOFM objects have characteristic value AKTIV_TFRM = 'X', inactive objects have characteristic value AKTIV_TFRM = initial.
    VOFM objects flagged as 'active' are 'known' to the calling program logic, that means they were included in the main program of the 'calling program' and can thus be addressed and
    processed during the runtime.
    You cannot delete VOFM objects that are still 'active'. In this case you have to reset the active indicator manually before.
    The content of the 'Application' field serves to filter the relevant VOFM objects in various display functions and Customizing functions.
    Example: Condition value formula 010 'Relevant Price'. This formula has characteristic value 'MS' for the 'Application' field (= External Services Management purchasing). Therefore the object is not open for selection in the input help during the maintenance of pricing procedure SD (Transaction V/08), because this is a Customizing transaction assigned to application 'V' (= Sales and Distribution).
    Storing an application key is optional.
    The generation date and the generation time record the time of the last registration of the VOFM object (the object carrier, refer to section 2.4.1).
    In addition to the respective TFRM entry a VOFM object can have 'n' entries in table TFRMT. The entries are used for the storage of language-dependent object descriptions, which are structured as follows:
    - Language key [SPRAS]
    - Group indicator [GRPZE]
    - Group number [GRPNO]
    - Description [BEZEI]
    Examples:
    SPRAS     GRPZE     GRPNO     BEZEI
    D     PBED     001     Regulierer abweich
    E     PBED     001     Different payer
    The system supplies the language key automatically with the logon language of the user during the creation of a new VOFM object.
    The length of the object description is limited to 20 characters.
    Important! A VOFM object is only consistent if both the Include file with ABAP form routine and a corresponding TFRM table entry exist. Entries in table TFRMT are optional.
    2.4 Calling VOFM objects
    As mentioned above, VOFM objects are called directly by the application logic of R/3 standard programs. Technically this is implemented by ABAP statement 'PERFORM ... IN PROGRAM'. With the aid of this statement you can specify both the name of the subroutine and the main program dynamically (during the runtime).
    Example: Call of a condition value formula from the pricing
    if xkomv-kofrm ne 0. <<< formula reference existing?
    xkwert = xkomv-kwert. <<< act. value in work variable
    frm_kondi_wert-nr = xkomv-kofrm. <<< set up object names
    perform (frm_kondi_wert) in program saplv61a if found. <<<CALL
    xkomv-kwert = xkwert. <<
    endif.
    In the example above the subroutine is determined by the contents of variable 'FRM_KONDI_WERT'; the main program, which is to be searched for the form routine, is SAPLV61A.
    If the called routine is not known in the main program, a program termination with the title 'PERFORM_NOT_FOUND' occurs.
    Therefore some users of the VOFM technology call ABAP statement 'PERFORM ... IN PROGRAM' together with the addition 'IF FOUND', which has the effect that a jump into the form routine is only executed if this in fact exists in the main program. This does indeed prevent a program termination, however, the result of the overall process may deviate from the
    result expected by the user, because in this case the system does not execute the source code implemented in the VOFM object.
    2.4.1 VOFM 'object carrier'
    Object carriers are required to make a VOFM object 'known' in the main program of the calling program (refer to section 2.4). The object carrier is integrated in the main program of the calling program as an independent include (for example SAPLV61A, SAPMV45A and so on).
    Example: Inclusion of object carriers for word processing in SD
    documents; Program 'SAPLV45T'
    System-defined Include-files. *
    INCLUDE LV45TTOP. "Global Data
    INCLUDE LV45TDEF.
    INCLUDE LV45TUXX. "Function Modules
    INCLUDE LV45TNNN. <<< 'carrier' copy requirements for texts
    INCLUDE LV45TENN. <<< 'carrier' copy routines for texts
    Every active VOFM object (for an explanation on the active indicator refer to section 2.3.2) must be registered in the 'carrier'.
    The system writes standard VOFM objects delivered by SAP directly into the 'carrier', VOFM objects from the number range reserved for customers (refer to section 2.2 'Namespaces') are sorted into a 'sub-include' included in the carrier.
    Exactly one carrier exists per group indicator. The names of all defined object carriers are hard-coded in program MV80HF0A, form routine 'AKTIVIEREN_TRAEGER_SETZEN'.
    Here the names of the sub-include for customer-specific VOFM objects belonging to the main carrier are also defined.
    Example: Carrier object 'FV63ANNN' for the registration of condition basis formulas in the pricing (Program SAPLV61A)
    FV63ANNN
    <<< main
    carrier-include
    |-INCLUDE RV63ANNN. "User-Routinen <<< sub-include customer objects
    | |- INCLUDE RV63A910. "Customer specific
    | |- INCLUDE RV63A911. "Customer specific
    | |- INCLUDE RV63A912. "Customer specific
    | |- ...
    |- INCLUDE FV63A001. "Volume
    |- INCLUDE FV63A002. "Net value
    |- INCLUDE FV63A003. "Net Price
    |- INCLUDE FV63A004. "Net Value Plus Tax
    |- INCLUDE FV63A005. "KZWI1
    |- ...
    Because the content of the VOFM object carriers is automatically created source code, you should avoid manual changes to them.
    SAP notes, which suggest manual changes to the object carriers, are therefore also incorrect. However, if you nevertheless receive such a note to solve a problem, contact the SAP
    Support with a reference to this note.
    2.5 Activation, generation and RV80HGEN
    The 'activation' is the inclusion of an VOFM object in an object carrier. A 'deactivation' results in the removal of the VOFM object from the object carrier.
    The overall process for the creation of a current object carrier is often called 'generation'.
    Generally the activation or generation fall into three types.
    - Individual activation
    - Collective activation
    - Generation of object carriers via report RV80HGEN
    The 'individual activation' causes the registration of an individual VOFM object in the corresponding object carrier. Which object carrier is relevant is determined with the aid of the group indicator and the group number. In addition to the entry of the VOFM object in the object carrier the system writes the date and time of the generation into table TFRM (refer also to section 2.3.2).
    You can start the individual activation only manually. It is always always executed when a user selects a line within the VOFM editing interfaces and afterwards selects activity
    'Activate' from the 'Edit' menu.
    The 'collective activation' causes the registration of all VOFM objects that belong to a certain group indicator. Analog to the individual activation the system determines the relevant object carrier automatically and writes date and time into table TFRM. The 'collective activation' is a process which you can start also only manually. For this purpose, choose activity
    'Activate all' from the 'Edit' menu.
    During the generation via report RV80HGEN the system sets up the object carriers of all defined group indicators again. However, the system includes only those VOFM objects that have set the 'active' indicator in the corresponding TFRM table entry. Nonactive VOFM objects are not included in object carriers during the generation via report RV80HGEN.
    Due to the quantity of the data to be processed,
    the generation via RV80HGEN can take between 0,5 and >5 minutes (depending on the system and the constellation).
    Because the RV80HGEN is defined as 'XPRA', it is executed automatically during a system upgrade.
    You can also use this XPRA feature for the transport of VOFM objects in order to implement an automatic update of the object carriers after the import of VOFM objects into the target system (section 2.6 provides more details on the transport).
    Both the collective activation and the activation via report RV80HGEN technically revert to the program components of the individual activation. For the separate control of the individual activation types form routine AKTIVIEREN_EINZELN (Include MV80HF0A) has a 'USING' parameter, which can have the following characteristic values:
    'E' Activate individually
    'A' Activate all (= collective activation)
    ' ' Deactivate individually
    During the generation via RV80HGEN the system executes a collective activation for every group indicator sequentially, that means a call of form routine
    AKTIVIEREN_EINZELN with characteristic value 'A'.
    2.6 Transport
    If you want to transfer VOFM objects from one system (= source) into another system (= target), this is generally made with an object transport.
    As of Release 4.0, the VOFM function has a connection to the SAP 'Change and Transport System' (CTS) in order to simplify the transfer process for the user.
    By the transport connection the system automatically adds newly created or changed VOFM objects to the object list of a transport request which was selected by the user before.
    All steps necessary for the execution of a VOFM transport are described in detail in Note 22808 'Transferring formulas'. Note that steps 1-4 are only needed
    if the VOFM maintenance environment providesno automatic connection to the transport system or if you want to combine a transport request manually. In any case you must execute step 5, regardless of how the transport request was created.
    In addition to Note 22808, Note 385067 contains an overview for releases >= 4.6C regarding which sorts of tasks and object entries are required in a
    transport request (depending on the activity carried out (create/change/activate/deactivate/delete)) in order to transport a VOFM object successfully.

  • How to find a certain usage of a specific value inside an SSIS package

    Hi,
    In T-SQL, there are many tools to search for instances of a specific value in all the objects such as tables and SPs.
    The only way I can think of in SSIS, is to search for a value in the XML of the DTSX, but it is not that user friendly.
    Are there any existing tools or other ways for a value search that can assist ?
    Thanks,
    Dani

    Since a package is just a plain text XML file thus  you are able to perform a text search in the file.
    http://sqlblog.com/blogs/jamie_thomson/archive/2012/06/12/using-find-replace-with-regular-expressions-inside-a-ssis-package.aspx
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Total order value (net) per PO with ME2N (Purchase order List display)

    Hello,
    with ME2N I can see the order value (net) of a PO per item line. Is it also possible to see the the total order value for all item lines in a PO?
    Thanks for coming back to me!
    Sofia

    hi in standard reports that is not possible
    But you can opt for filter in PO no. feild and go for an specific PO and press enter it will show all the line item of that PO then you can apply the Total of all Po line items in net price feild
    Or even while running the report you can go for specific PO no and then execute the report.
    Hope this helps
    Else need to devlop an Z report with help of ABAPER
    Try with the table EKPO and feild RLWRT
    He can solve your purpose
    Regards
    Sujoy
    Edited by: SUJOY on Sep 22, 2008 2:39 PM

  • Trying to get multiple cell values within a geometry

    I am provided with 3 tables:
    1 - The GeoRaster
    2 - The geoRasterData table
    3 - A VAT table who's PK is the cell value from the above tables
    Currently the user can select a point in our application and by using the getCellValue we get the cell value which is the PK on the 3rd table and this gives us the details to return to the user.
    We now want to give the worst scenario within a given geometry or distance. So if I get back all the cell values within a given geometry/distance I can then call my other functions against the 3rd table to get the worst scores.
    I had a conversation open for this before where JeffreyXie had some brilliant input, but it got archived while I was waiting on Oracle to resolve a bug (about 7 months)
    See:
    Trying to get multiple cell values within a geometry
    If I am looking to get a list of cell values that interact with my geometry/distance and then loop through them, is there a better way?
    BTW, if anybody wants to play with this functionality, it only seems to work in 11.2.0.4.
    Below is the code I was using last, I think it is trying to get the cell values but the numbers coming back are not correct, I think I am converting the binary to integer wrong.
    Any ideas?
    CREATE OR REPLACE FUNCTION GEOSUK.getCellValuesInGeom_FNC RETURN VARCHAR2 AS
    gr sdo_georaster;
    lb blob;
    win1 sdo_geometry;
    win2 sdo_number_array;
    status VARCHAR2(1000) := NULL;
    CDP varchar2(80);
    FLT number := 0;
    cdl number;
    vals varchar2(32000) := null;
    VAL number;
    amt0 integer;
    amt integer;
    off integer;
    len integer;
    buf raw(32767);
    MAXV number := null;
    r1 raw(1);
    r2 raw(2);
    r4 raw(200);
    r8 raw(8);
    MATCH varchar2(10) := '';
    ROW_COUNT integer := 0;
    COL_COUNT integer := 0;
    ROW_CUR integer := 0;
    COL_CUR integer := 0;
    CUR_XOFFSET integer := 0;
    CUR_YOFFSET integer := 0;
    ORIGINY integer := 0;
    ORIGINX integer := 0;
    XOFF number(38,0) := 0;
    YOFF number(38,0) := 0;
    BEGIN
    status := '1';
    SELECT a.georaster INTO gr FROM JBA_MEGARASTER_1012 a WHERE id=1;
    -- first figure out the celldepth from the metadata
    cdp := gr.metadata.extract('/georasterMetadata/rasterInfo/cellDepth/text()',
    'xmlns=http://xmlns.oracle.com/spatial/georaster').getStringVal();
    if cdp = '32BIT_REAL' then
    flt := 1;
    end if;
    cdl := sdo_geor.getCellDepth(gr);
    if cdl < 8 then
    -- if celldepth<8bit, get the cell values as 8bit integers
    cdl := 8;
    end if;
    dbms_lob.createTemporary(lb, TRUE);
    status := '2';
    -- querying/clipping polygon
    win1 := SDO_GEOM.SDO_BUFFER(SDO_GEOMETRY(2001,27700,MDSYS.SDO_POINT_TYPE(473517,173650.3, NULL),NULL,NULL), 10, .005);
    status := '1.2';
    sdo_geor.getRasterSubset(gr, 0, win1, '1',
    lb, win2, NULL, NULL, 'TRUE');
    -- Then work on the resulting subset stored in lb.
    status := '2.3';
    DBMS_OUTPUT.PUT_LINE ( 'cdl: '||cdl );
    len := dbms_lob.getlength(lb);
    cdl := cdl / 8;
    -- make sure to read all the bytes of a cell value at one run
    amt := floor(32767 / cdl) * cdl;
    amt0 := amt;
    status := '3';
    ROW_COUNT := (WIN2(3) - WIN2(1))+1;
    COL_COUNT := (WIN2(4) - WIN2(2))+1;
    --NEED TO FETCH FROM RASTER
    ORIGINY := 979405;
    ORIGINX := 91685;
    --CALCUALATE BLOB AREA
    YOFF := ORIGINY - (WIN2(1) * 5); --177005;
    XOFF := ORIGINX + (WIN2(2) * 5); --530505;
    status := '4';
    --LOOP CELLS
    off := 1;
    WHILE off <= LEN LOOP
    dbms_lob.read(lb, amt, off, buf);
    for I in 1..AMT/CDL LOOP
    if cdl = 1 then
    r1 := utl_raw.substr(buf, (i-1)*cdl+1, cdl);
    VAL := UTL_RAW.CAST_TO_BINARY_INTEGER(R1);
    elsif cdl = 2 then
    r2 := utl_raw.substr(buf, (i-1)*cdl+1, cdl);
    val := utl_raw.cast_to_binary_integer(r2);
    ELSIF CDL = 4 then
    IF (((i-1)*cdl+1) + cdl) > len THEN
    r4 := utl_raw.substr(buf, (i-1)*cdl+1, (len - ((i-1)*cdl+1)));
    ELSE
    r4 := utl_raw.substr(buf, (i-1)*cdl+1, cdl+1);
    END IF;
    if flt = 0 then
    val := utl_raw.cast_to_binary_integer(r4);
    else
    val := utl_raw.cast_to_binary_float(r4);
    end if;
    elsif cdl = 8 then
    r8 := utl_raw.substr(buf, (i-1)*cdl+1, cdl);
    val := utl_raw.cast_to_binary_double(r8);
    end if;
    if MAXV is null or MAXV < VAL then
    MAXV := VAL;
    end if;
    IF i = 1 THEN
    VALS := VALS || VAL;
    ELSE
    VALS := VALS ||'|'|| VAL;
    END IF;
    end loop;
    off := off+amt;
    amt := amt0;
    end loop;
    dbms_lob.freeTemporary(lb);
    status := '5';
    RETURN VALS;
    EXCEPTION
        WHEN OTHERS THEN
            RAISE_APPLICATION_ERROR(-20001, 'GENERAL ERROR IN MY PROC, Status: '||status||', SQL ERROR: '||SQLERRM);
    END;

    Hey guys,
    Zzhang,
    That's a good spot and as it happens I spotted that and that is why I am sure I am querying that lob wrong. I always get the a logic going past the total length of the lob.
    I think I am ok using 11.2.0.4, if I can get this working it is really important to us, so saying to roll up to 11.2.0.4 for this would be no problem.
    The error in 11.2.0.3 was an internal error: [kghstack_underflow_internal_3].
    Something that I think I need to find out more about, but am struggling to get more information on is, I am assuming that the lob that is returned is all cell values or at lest an array of 4 byte (32 bit) chunks, although, I don't know this.
    Is that a correct assumption or is there more to it?
    Have either of you seen any documentation on how to query this lob?
    Thanks

  • How can I sum the values in a given column on sheet 1 i.e. A1:A50 based on the adjacent columns specific value i.e. B1:B50 = "Living Room" on sheet 2

    How can I sum the values in a given column on sheet 1 i.e. A1:A50 based on the adjacent columns specific value i.e. B1:B50 = “Dinning Room” on sheet 2
    For Example:
    SHEET 1
    A
    B
    $50
    Dinning Room
    $800
    Dinning Room
    $300
    Kitchen
    $1,000
    Master Bedroom
    $100
    Dinning Room
    SHEET 2
    Display the total SUM amount of each Project based on Sheet 1
    Project Name
    Total Cost
    Dinning Room
    $950
    Kitchen
    $300

    Would be a good idea to open iWork Formulas and Functions User Guide and search for the description of the function named SUMIF
    The Guide is available for every user thru the Help menu.
    Yvan KOENIG (VALLAURIS, France) jeudi 19 mai 2011 17:32:42
    Please :
    Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Sorting based on a specific value in Columns

    Hi All,
    Crystal 2008 version I have. And we are connecting to BW queries as source.
    In a crosstab, I want to sort my row values based on a column value.
    For example, in rows I have an element with three values . In column I have only one element(month), with couple of month values. My requirement is to sort rows based on a specific month (Mar'09 for example).
    .....................Jan'09......Feb'09.....Mar'09
    ABC...............10.............323...........33....
    XYZ...............32..............33............11....
    FGH...............5................34.............55...
    But when I try to sort based on the Month, I can not select a specific value(mar'09). And it sorts based on the total value (sum of all months).
    How can I achieve this problem?
    Thanks
    Ozan

    For {Sort Value}, if you wanted to sort on the Jan column, then substitute the field name that your example shows as 10 in row ABC.  For {row value}, substitute the field name that is used in the first column (ABC in the example).
    In other words, take the value that you want to sort on, and put it in front of the value currently displaying as the row header.  Then, sort on the results.
    The purpose of the "000000000.00" is to make the length of the number, when converted to string, a consistent size.  This is needed (a) so you know how many characters to strip off when displaying the row value, and (b) so the records don't sort as 1, 12, 2, 234, 235423, 25, 3, ...
    HTH,
    Carl

  • How to specifically sort the data in a database using c#?

    H!,
    I have a problem in c# that require sorting of names of students in a sql database and i want it to be specific, i used data grid view to view the data of the students as shown below:
    Students First Name:
    Ann
    Antoinette
    Brenda
    Judith
    Lester
    Santos
    Suzie
    Tim
    if i type in a letter or abbreviation @ a textbox1 for example "s", all Names that starts with letter s will be sorted first so the output now of the query will become:
    Students First Name:
    Santos
    Suzie
    Ann
    Antoinette
    Brenda
    Judith
    Lester
    Tim
    So if i type j, all that starts with j will be first, and so on.
    I need help for this problem coz it is so hard for me to output the students with this kind of sorting and is there a code or query string related to this problem?
    thanks in advance.
    Hardz

    Hi,
    One way is to write a query as shown below:
    declare @char nvarchar(1)
    select @char = 'S'
    Declare @t table(name nvarchar(max))
    insert into @t
    values
    ('Santos'),
    ('Suzie'),
    ('Ann'),
    ('Antoinette'),
    ('Brenda'),
    ('Judith'),
    ('Lester'),
    ('Tim')
    select name
    from @t
    where RIGHT(name,1) like @char
    union all
    select name
    from
    (select top 100 percent name
    from @t
    where RIGHT(name,1) not like @char
    order by name) a
    Hope this helps. 
    -Chintak

  • Total Amount value not displaying while executing print progrm for PO form.

    Hi All,
               I created the PO form, for this i written a print program.After executing this print program everything s displaying & populating, but only the Total Amount  not displaying r not populating.
              But, if i run the PO n tcode ME23N the Total Amount is displaying, after assigning the form n NACE.
    So help me to get the Total Amount to be displayed n main window, while executing the print program.
    Like this i declared n smartform,                    Total net value excl. tax           &is_ekko-waers& &is_pekko-netwr&......
    The print program as follows,
    report zpo.
    tables: ekko,pekko,ekpo,ekpa,eket,ekkn,ekek,komk,nast.
    data: fm_name type rs38l_fnam.
    data: is_ekko type standard table of ekko with header line.
    data: is_pekko type pekko occurs 0 with header line.
    data: it_ekpa like standard table of ekpa,
          it_ekpo like standard table of ekpo,
          it_pekpo like standard table of pekpo,
          it_eket like standard table of eket,
          it_tkomv like standard table of komv,
          it_ekkn like standard table of ekkn,
          it_ekek like standard table of ekek,
          it_komk like standard table of komk.
    selection-screen: begin of block b1 with frame title text-001.
      parameters: pr_ebeln like ekpo-ebeln obligatory.
    selection-screen: end of block b1.
    select * from ekpo into table it_ekpo where ebeln = pr_ebeln.
    select * from ekko into is_ekko where ebeln = pr_ebeln.
    endselect.

    code as follows,
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZPURCHASE'
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
    IMPORTING
        FM_NAME                  = fm_name
    CALL FUNCTION fm_name  "'/1BCDWB/SF00000060'
      EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
        IS_EKKO                    = is_ekko
        IS_PEKKO                   = is_pekko
    *   IS_NAST                    =
    *   IV_FROM_MEM                =
    *   IV_DRUVO                   =
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
      TABLES
           it_ekpo                   = it_ekpo
           it_pekpo                  = it_pekpo
           it_ekkn                   = it_ekkn
           it_ekpa                   = it_ekpa
           it_ekek                   = it_ekek
           it_komk                   = it_komk
           it_eket                   = it_eket
           it_tkomv                  = it_tkomv.
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • How do I encrypt my external hard drive and subsequently a specific file within it, using my Mac? I tried creating a disk image but permission was denied.

    Encrypting an external hard drive and specific folders within. Permission denied using disk image.

    VKP90 wrote:
    When I tried to encrypt a single file within the hard drive itself, I got the following: Disk Utility Progress: Unable to create "Name of my file" (Permission Denied).
    When I tried encrypting the entire hard disk itself, I got: A GUID Partition Table (GPT) partitioning scheme is required.
    I have also currently used Time Machine on the external hard drive, along with saving other data. Hence, I am not sure if partitioning is going to delete any of this (a video I watched mentioned that using the + button when creating partitions retains current data). Backing up the external hard drive is out of the option since it is the back up to my Mac.
    You can't encrypt a single file. I'm not sure what you did to try. You can make an encrypted disk image which begins with a folder, if desired. Or, you can just create a blank, encrypted disk image, then move your desired files into that.
    While you could partition off the free space without erasing the disk, you cannot encrypt it because you need a GUID Partition table which requires you to repartition the entire drive, not just the free space.

  • Is there a way to sort a PDF file with multiple pages by a specific field within the PDF? All pages have the same invoice format and i would like to sort by a field within and then print the documents. (Vendor, PO

    Is there a way to sort a PDF file with multiple pages by a specific field within the PDF? All pages have the same invoice format and i would like to sort by a field within and then print the documents. (Vendor, PO#, Date, ect.)

    When you say field, do you mean specifically a form field, such as a text field? Or is the information regular text on the page?

  • Get rid of BarChart Legend and create a Horizontal Line on a specific value

    Hey,
    i'm working with BarCharts.
    1st Screen: I want to disable the Legend of my Barchart.
    http://imgur.com/wMo6Tfv,DRiNA9C
    Second Screen: I want to create a Line in my Barchart on a specific Value like 700 as seen on the screen.
    http://imgur.com/wMo6Tfv,DRiNA9C#1
    Is this Possible ? Also: For what object do i need to set the ID to change the bar's color. i've tried
    Chart barchart;
    barchart.setId("Chart");
    css:
    #barchart
    -fx-background-color: red;
    But it didn't work. Thanks!

    No, you're not missing anything; I had a temporary brain freeze. You can't add Nodes directly to an arbitrary region.
    So this makes it a bit harder. You need to add the line to the container in which your Chart is held, and of course that means you have to figure out the coordinates of the line relative to that container. To simplify it a bit, the axis has a scale property for converting from axis units to screen units, and also according to the css docs, the chart has a child with css class "chart-horizontal-zero-line". So one possible strategy is to grab that line and figure the change in coordinates needed from it. There's still work to do to figure the correct coordinates relative to the container, and if you want it to work with things moving around (such as when the user resizes the window), you need to do a bunch of binding.
    This seems to work:
    import java.util.Arrays;
    import java.util.List;
    import javafx.application.Application;
    import javafx.beans.binding.DoubleBinding;
    import javafx.beans.property.DoubleProperty;
    import javafx.beans.property.SimpleDoubleProperty;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.chart.CategoryAxis;
    import javafx.scene.chart.LineChart;
    import javafx.scene.chart.NumberAxis;
    import javafx.scene.chart.XYChart;
    import javafx.scene.control.Button;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.Region;
    import javafx.scene.shape.Line;
    import javafx.stage.Stage;
    import javafx.util.StringConverter;
    public class LineChartSample extends Application {
      @Override
      public void start(Stage stage) {
        stage.setTitle("Line Chart Sample");
        final CategoryAxis xAxis = new CategoryAxis();
        final NumberAxis yAxis = new NumberAxis();
        yAxis.setTickLabelFormatter(new StringConverter<Number>() {
          @Override
          public Number fromString(String string) {
            return Double.parseDouble(string);
          @Override
          public String toString(Number value) {
            return String.format("%2.2f", value);
        xAxis.setLabel("Month");
        final LineChart<String, Number> lineChart = new LineChart<String, Number>(
            xAxis, yAxis);
        lineChart.setTitle("Stock Monitoring, 2010");
        lineChart.setAnimated(false);
        final XYChart.Series<String, Number> series = new XYChart.Series<>();
        series.setName("My portfolio");
        final List<XYChart.Data<String, Number>> data = Arrays.asList(
        new XYChart.Data<String, Number>("Jan", 23),
            new XYChart.Data<String, Number>("Feb", 14),
            new XYChart.Data<String, Number>("Mar", 15),
            new XYChart.Data<String, Number>("Apr", 24),
            new XYChart.Data<String, Number>("May", 34),
            new XYChart.Data<String, Number>("Jun", 36),
            new XYChart.Data<String, Number>("Jul", 22),
            new XYChart.Data<String, Number>("Aug", 45),
            new XYChart.Data<String, Number>("Sep", 43),
            new XYChart.Data<String, Number>("Oct", 17),
            new XYChart.Data<String, Number>("Nov", 29),
            new XYChart.Data<String, Number>("Dec", 25));
        series.getData().addAll(data);
        final AnchorPane chartContainer = new AnchorPane();
        AnchorPane.setTopAnchor(lineChart, 0.0);
        AnchorPane.setBottomAnchor(lineChart, 0.0);
        AnchorPane.setLeftAnchor(lineChart, 0.0);
        AnchorPane.setRightAnchor(lineChart, 0.0);
        chartContainer.getChildren().add(lineChart);
        Button button = new Button("Show line");
        button.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            final double lineLevel = 35;
            final Region chartRegion = (Region) lineChart
                .lookup(".chart-plot-background");
            final Line zeroLine = (Line) lineChart
                .lookup(".chart-horizontal-zero-line");
            final DoubleProperty startX = new SimpleDoubleProperty(0);
            final DoubleProperty endX = new SimpleDoubleProperty(0);
            final DoubleProperty y = new SimpleDoubleProperty(0);
            startX.bind(new DoubleBinding() {
                super.bind(chartRegion.boundsInParentProperty());
              @Override
              protected double computeValue() {
                double x = chartRegion.getBoundsInParent().getMinX();
                for (Node n = zeroLine.getParent().getParent(); n != chartContainer && n.getParent() != null; n = n.getParent()) {
                  x += n.getBoundsInParent().getMinX();
                return x;
            endX.bind(new DoubleBinding() {
                super.bind(chartRegion.boundsInParentProperty());
              @Override
              protected double computeValue() {
                double x = chartRegion.getBoundsInParent().getMaxX();
                for (Node n = zeroLine.getParent().getParent(); n != chartContainer && n.getParent() != null; n = n.getParent()) {
                  x += n.getBoundsInParent().getMinX();
                return x;
            y.bind(new DoubleBinding() {
                super.bind(chartRegion.boundsInParentProperty(),
                    yAxis.scaleProperty(), zeroLine.startYProperty());
              @Override
              protected double computeValue() {
                double y = zeroLine.getStartY() + lineLevel * yAxis.getScale();
                for (Node n = zeroLine.getParent().getParent(); n != chartContainer && n.getParent() != null; n = n.getParent()) {
                  y += n.getBoundsInParent().getMinY();
                return y;
            Line line = new Line();
            line.startXProperty().bind(startX);
            line.endXProperty().bind(endX);
            line.startYProperty().bind(y);
            line.endYProperty().bind(y);
            chartContainer.getChildren().add(line);
        BorderPane root = new BorderPane();
        root.setCenter(chartContainer);
        root.setTop(button);
        Scene scene = new Scene(root, 800, 600);
        lineChart.getData().add(series);
        stage.setScene(scene);
        stage.show();
      public static void main(String[] args) {
        launch(args);
    }

  • Read two CSV files and remove the duplicate values within them.

    Hi,
    I want to read two CSV files(which contains more than 100 rows and 100 columns) and remove the duplicate values within that two files and merge all the unique values and display it as a single file.
    Can anyone help me out.
    Thanks in advance.

    kirthi wrote:
    Can you help me....Yeah, I've just finished... Here's a skeleton of my solution.
    The first thing I think you should do is write a line-parser which splits your input data up into fields, and test it.
    Then fill out the below parse method, and test it with that debugPrint method.
    Then go to work on the print method.
    I can help a bit along the way, but if you want to do this then you have to do it yourself. I'm not going to do it for you.
    Cheers. Keith.
    package forums.kirthi;
    import java.util.*;
    import java.io.PrintStream;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.IOException;
    import krc.utilz.io.ParseException;
    import krc.utilz.io.Filez.LineParser;
    import krc.utilz.io.Filez.CsvLineParser;
    public class DistinctColumnValuesFromCsvFiles
      public static void main(String[] args) {
        if (args.length==0) args = new String[] {"input1.csv", "input2.csv"};
        try {
          // data is a Map of ColumnNames to Sets-Of-Values
          Map<String,Set<String>> data = new HashMap<String,Set<String>>();
          // add the contents of each file to the data
          for ( String filename : args ) {
            data.putAll(parse(filename));
          // print the data to output.csv
          print(data);
        } catch (Exception e) {
          e.printStackTrace();
      private static Map<String,Set<String>> parse(String filename) throws IOException, ParseException {
        BufferedReader reader = null;
        try {
          reader = new BufferedReader(new FileReader(filename));
          CsvLineParser.squeeze = true; // field.trim().replaceAll("\\s+"," ")
          LineParser<String[]> parser = new CsvLineParser();
          int lineNumber = 1;
          // 1. read the column names (first line of file) into a List
          // 2. read the column values (subsequent lines of file) into a List of Set's of String's
          // 3. build a Map of columnName --> columnValues and return it
        } finally {
          if(reader!=null)reader.close();
      private static void debugPrint(Map<String,Set<String>> data) {
        for ( Map.Entry<String,Set<String>> entry : data.entrySet() ) {
          System.out.println("DEBUG: "+entry.getKey()+" "+Arrays.toString(entry.getValue().toArray(new String[0])));
      private static void print(Map<String,Set<String>> data) {
        // 1. get the column names from the table.
        // 2. create a List of List's of String's called matrix; logically [COL][ROW]
        // 3. print the column names and add the List<String> for this col to the matrix
        // 4. print the matrix by inerating columns and then rows
    }

Maybe you are looking for

  • SOA server not starting - log attached

    These are the messages I see in the log : <Sep 29, 2011 3:11:47 PM IST> <Emergency> <Management> <BEA-141151> <The admin server could not be reached at http://HGUDIKAN-pc:7001.> <Sep 29, 2011 3:11:47 PM IST> <Info> <Configuration Management> <BEA-150

  • MacBook with Windows Vista Shared Folders

    So, my question and the problem is, that I can't seem to make my MacBook connect to a Windows Vista shared folder (Default Public folder, or any other folder). I've tried pretty much everything on the windows end. I've reset the sharing options, star

  • Creating a new drop down menu when an option in an existing one is chosen

    I'm using Coldfusion 9,0,0,251028 on Windows 7 64-bit, with a Microsoft Access 97 database.  I'm having a problem with using a drop-down menu to create another one below it once a certain option is selected (in this case, the option named "Breaking N

  • Does Muse have a widget that will allow users to book tables and/or pay for take-away?

    I have already used Muse to set up my portfolio. Now a new challenge - I need to create a website for mobile / tablet users that permits browsing dishes, booking tables and maybe a widget that allows them to pay on-line before collection? I've scanne

  • Performance with library on OS drive?

    Right now I have my Aperture library on a second internal drive, but my main drive with the operating system has gobs of unused space and I'm thinking of transferring the library to the boot drive. Would that do anything to the performance of Apertur