Comparing rows within cfgrid

I have 2 queries that populate a third query using cfloop and
querynew. The third query, "table1", works just fine. But I am
using a java format cfgrid to output "table1". I want to highlight,
change color, or something, when the value in one column's row does
not match another column's row. Is that possible? How?

I have 2 queries that populate a third query using cfloop and
querynew. The third query, "table1", works just fine. But I am
using a java format cfgrid to output "table1". I want to highlight,
change color, or something, when the value in one column's row does
not match another column's row. Is that possible? How?

Similar Messages

  • Comparing columns within cfgrid

    I have 2 queries that populate a third query using cfloop and
    querynew. The third query, "table1", works just fine. But I am
    using a java format cfgrid to output "table1". I want to highlight,
    change color, or something, when the value in one column's row does
    not match another column's row. Is that possible? How?

    Here's my code:
    <cfquery name="qrytl2000" datasource="libl">
    SELECT #choose2# FROM tldb70.drmst WHERE dracpy = 05 AND
    drasts IN (#preservesinglequotes(status2)#) AND (DRASID = '100' OR
    DRASID = '300')
    AND dradsp IN (99981,99982,99991,99992,99993,99994)
    </cfquery>
    <cfset table1 =
    querynew("tl2000drivercode,tl2000drivername,tl2000fleet,tl2000status,sqldrivercode,sqldri vername,sqlfleet,sqlstatus","varchar,varchar,integer,varchar,varchar,varchar,integer,varch ar")>
    <cfloop query="qrytl2000">
    <cfset addrow = queryaddrow(table1,1)>
    <cfset driverset =
    querysetcell(table1,"tl2000drivercode",qrytl2000.dradrv)>
    <cfset nameset =
    querysetcell(table1,"tl2000drivername",qrytl2000.dranam)>
    <cfquery name="qrysql" datasource="timeoff">
    SELECT #choose# FROM dbo.log_status WHERE drivercode =
    '#trim(qrytl2000.dradrv)#'
    </cfquery>
    <cfset driverset2 =
    querysetcell(table1,"sqldrivercode",qrysql.drivercode)>
    <cfset nameset2 =
    querysetcell(table1,"sqldrivername",qrysql.drivername)>
    <!---This section is for the Fleet number from TL2000.
    JP--->
    <cfif isDefined("qrytl2000.dradsp") AND
    #qrytl2000.dradsp# NEQ "">
    <cfset fleetset =
    querysetcell(table1,"tl2000fleet",qrytl2000.dradsp)>
    <cfset fleetset2 =
    querysetcell(table1,"sqlfleet",qrysql.fleet)>
    <cfelse>
    <cfset fleetset =
    querysetcell(table1,"tl2000fleet","")>
    <cfset fleetset2 = querysetcell(table1,"sqlfleet","")>
    </cfif>
    <!---This section is for the Driving Status from TL2000.
    JP--->
    <cfif isDefined("qrytl2000.drasts") AND
    #qrytl2000.drasts# NEQ "">
    <cfset statusset =
    querysetcell(table1,"tl2000status",qrytl2000.drasts)>
    <cfset statusset2 =
    querysetcell(table1,"sqlstatus",qrysql.drivingstatus)>
    <cfelse>
    <cfset statusset =
    querysetcell(table1,"tl2000status","")>
    <cfset statusset2 =
    querysetcell(table1,"sqlstatus","")>
    </cfif>
    </cfloop>
    <cfformgroup type="horizontal">
    <cfgrid name="details" query="table1" format="applet"
    colheaderbold="yes" colheaderalign="center" rowheaders="no"
    griddataalign="center" height="650" width="1200">
    <cfif #table1.sqlstatus# NEQ #table1.tl2000status#>
    <cfgridcolumn header="TL2000 PTO Code"
    name="tl2000drivercode" bgcolor="##FF3333" dataalign="left"
    width="120">
    <cfgridcolumn header="Database PTO Code"
    name="sqldrivercode" bgcolor="##FF3333" dataalign="left"
    width="140">
    <cfif isDefined("URL.drivername") AND #URL.drivername# EQ
    "drivername">
    <cfgridcolumn header="TL2000 PTO Name"
    name="tl2000drivername" bgcolor="##FF3333" dataalign="left"
    width="200">
    <cfgridcolumn header="Database PTO Name"
    name="sqldrivername" bgcolor="##FF3333" dataalign="left"
    width="200">
    </cfif>
    <cfif isDefined("URL.fleet") AND #URL.fleet# EQ
    "fleet">
    <cfgridcolumn header="TL2000 Fleet" name="tl2000fleet"
    bgcolor="##FF3333" width="100">
    <cfgridcolumn header="Database Fleet" name="sqlfleet"
    bgcolor="##FF3333" width="100">
    </cfif>
    <cfif isDefined("URL.status") AND #URL.status# EQ
    "status">
    <cfgridcolumn header="TL2000 PTO Status"
    name="tl2000status" bgcolor="##FF3333" width="140">
    <cfgridcolumn header="Database PTO Status"
    name="sqlstatus" bgcolor="##FF3333" width="140">
    </cfif>
    <cfelse>
    <cfgridcolumn header="TL2000 PTO Code"
    name="tl2000drivercode" dataalign="left" width="120">
    <cfgridcolumn header="Database PTO Code"
    name="sqldrivercode" dataalign="left" width="140">
    <cfif isDefined("URL.drivername") AND #URL.drivername# EQ
    "drivername">
    <cfgridcolumn header="TL2000 PTO Name"
    name="tl2000drivername" dataalign="left" width="200">
    <cfgridcolumn header="Database PTO Name"
    name="sqldrivername" dataalign="left" width="200">
    </cfif>
    <cfif isDefined("URL.fleet") AND #URL.fleet# EQ
    "fleet">
    <cfgridcolumn header="TL2000 Fleet" name="tl2000fleet"
    width="100">
    <cfgridcolumn header="Database Fleet" name="sqlfleet"
    width="100">
    </cfif>
    <cfif isDefined("URL.status") AND #URL.status# EQ
    "status">
    <cfgridcolumn header="TL2000 PTO Status"
    name="tl2000status" width="140">
    <cfgridcolumn header="Database PTO Status"
    name="sqlstatus" width="140">
    </cfif>
    </cfif>
    </cfgrid>
    </cfformgroup>
    How can I compare the individual rows of data between the
    columns; ie, tl2000drivercode compared with sqldrivercode to see if
    they match or not?

  • Drag and drop row within same table.

    Version 12.1.2
    I am trying to implement drag and drop row within same table, and I am trying to follow this sample from Frank:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/106-reorder-table-rows-1921121.pdf
    But, I am getting this cast exception. The code I have in my dropEvent bean is identical to whats on the sample.
    oracle.jbo.server.ViewRowImpl cannot be cast to oracle.jbo.uicli.binding.JUCtrlHierNodeBinding
    ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #1
    Not sure if anything has changed on 12c release, or if I am missing anything.
    Here is my complete code:
    public DnDAction doDnD(DropEvent dropEvent) {
    RichTable table = (RichTable) dropEvent.getDragComponent();
    List dropRowKey = (List) dropEvent.getDropSite();
    if (dropRowKey == null) {
    return DnDAction.NONE;
    Transferable t = dropEvent.getTransferable();
    DataFlavor<RowKeySet> df = DataFlavor.getDataFlavor(RowKeySet.class, "rowmove");
    RowKeySet rks = t.getData(df);
    Iterator iter = rks.iterator();
    List draggedRowKey = (List) iter.next();
    JUCtrlHierNodeBinding draggeRowNode = (JUCtrlHierNodeBinding) table.getRowData(draggedRowKey);
    Row dragRow = draggeRowNode.getRow();
    JUCtrlHierNodeBinding dropRowObject = (JUCtrlHierNodeBinding) table.getRowData(dropRowKey);
    Row dropRow = dropRowObject.getRow();
    //get the table's ADF JUCtrlHierBinding
    CollectionModel collectionModel = (CollectionModel) table.getValue();
    JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
    DCIteratorBinding objectsIterator = treeBinding.getDCIteratorBinding();
    RowSetIterator rsi = objectsIterator.getRowSetIterator();
    int indexOfDropRow = rsi.getRangeIndexOf(dropRow);
    dragRow.removeAndRetain();
    rsi.insertRowAtRangeIndex(indexOfDropRow, dragRow);
    objectsIterator.setCurrentRowIndexInRange(indexOfDropRow);
    AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance();
    adfctx.addPartialTarget(table.getParent());
    return DnDAction.MOVE;
    It does not seem to like this line of code:
    JUCtrlHierNodeBinding draggeRowNode = (JUCtrlHierNodeBinding) table.getRowData(draggedRowKey);
    I would greatly appreciate any help.
    Thanks.

    Well there has bee a changes somehow. using 12c
    table.getRowData(draggedRowKey);
    returns a ViewRowImpl and no longer anything which can be convertet to JUCtrlHierNodeBinding. Anyway, the fix is easy:
        public DnDAction onDepartmentsRowDrop(DropEvent dropEvent) {
            //get the table instance. This information is later used
            //to determine the tree binding and the iterator binding
            RichTable table = (RichTable) dropEvent.getDragComponent();
            List dropRowKey = (List) dropEvent.getDropSite();
            //if no dropsite then drop area was not a data area
            if (dropRowKey == null) {
                return DnDAction.NONE;
            //The transferable is the payload that contains the dragged row's
            //row key that we use to access the dragged row handle in the ADF
            //iterator binding
            Transferable t = dropEvent.getTransferable();
            //get the row key set of the dragged row. The "rowmove" string is the
            //discriminant defined on the drag source and the collectionDrop target.
            DataFlavor<RowKeySet> df = DataFlavor.getDataFlavor(RowKeySet.class, "rowmove");
            RowKeySet rks = t.getData(df);
            Iterator iter = rks.iterator();
            //for this use case the re-order of rows is one-by-one, which means that the rowKeySet
            //should only contain a single entry. If it contains more then still we only look at a
            //singe (first) row key entry
            List draggedRowKey = (List) iter.next();
            //get access to the oracle.jbo.Row instance represneting this table row
            Object objdragg = table.getRowData(draggedRowKey);
            Row dragRow = (Row) objdragg;
            Object objdrop = table.getRowData(dropRowKey);
            Row dropRow = (Row) objdrop;
            //get the table's ADF JUCtrlHierBinding
            CollectionModel collectionModel = (CollectionModel) table.getValue();
            JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
            //get access to the ADF iterator binding used by the table and the underlying RowSetIterator.
            //The RowSetIterator allows us to remove and re-instert the dragged row
            DCIteratorBinding departmentsIterator = treeBinding.getDCIteratorBinding();
            RowSetIterator rsi = departmentsIterator.getRowSetIterator();
            int indexOfDropRow = rsi.getRangeIndexOf(dropRow);
            //remove dragged row from collection so it can be added back
            dragRow.removeAndRetain();
            rsi.insertRowAtRangeIndex(indexOfDropRow, dragRow);
            //make row current in ADF iterator.
            departmentsIterator.setCurrentRowIndexInRange(indexOfDropRow);
            //ppr the table
            AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance();
            //note that the refresh of the table didn't work when refreshing the table
            //so I needed to refresh the container component (af:panelStretchLayout).
            adfctx.addPartialTarget(table.getParent());
            return DnDAction.MOVE;
    does the trick. I changed the line to
    //get access to the oracle.jbo.Row instance represneting this table row
            Object objdragg = table.getRowData(draggedRowKey);
            Row dragRow = (Row) objdragg;
    so you don't need the detour through the JUCtrlHierNodeBinding any longer.
    Timo

  • Function Module to Compare Date within date Range

    Hi All,
            Does anyone know Function Module to Compare Date within date Range...For example i need to find whether 08/02/2006 falls in between 07/15/2006 and 09/15/2006......

    data: datum type sy-datum value '20070802',
          datum_low type sy-datum  value '20070730',
          datum_high type sy-datum value '20070930'.
    If datum between datum_low and datum_high.
    Endif.
    Regards,
    Rich Heilman

  • Required UDF for comparing values within same context

    I have to compare values within the same context.I am getting boolean values for that field.If all the values in the same context are true,then the result should be true .Otherwise false  should be passed.
    If input is-
    <context>                                  
    true
    false
    true
    <context>
    true
    true
    <context>
    Output should be as-
    <context>
    false
    <context>
    true
    <context>
    Please suggest how to acheive this?..its urgent

    Hi,
    Check with this UDF
    Src>UDF>target
    public void context1(String[] a,ResultList result,Container container)
        int k = 0;
        int arrayLength = a.length;
        if (arrayLength > 0)
            String firstElement = a[0];
            for (int i = 1; i < arrayLength; ++i)
                   if(!(a<i>.equalsIgnoreCase(firstElement)))
                     k = 0;
                     break;
                   else
                     k = 1;
    if(k == 1)
        result.addValue("true");
    else
        result.addValue("false");

  • Order table data with comparing rows

    Hi,
    My question is...
    I have table with with 5 columns this actually is been loaded from a file and there is no direct PK, but for that combination of columns as used to make them unique
    code, person, case
    Table X
    CODE             CASE              OLD_ID                NEW_ID            PERSON       AUTH
    01              ab122         1234               0001             AU123     99393
    07              vv353          7872               0919             FV982     78282
    01              ab122         1982               9929             AU123     99393
    04               hjsss         8839                8302            JK920     32320
    01              ab122         0001               1982             AU123     99393
    05              cg899         6728               32322           IKL020     65252
    07              w353          0919                8282             FV982     78282
    now I need to order this data comparing row values of old_id to new_id for each of the combinations of code, person, case
    need output like below
    Table X
    CODE             CASE              OLD_ID                NEW_ID            PERSON       AUTH
    01              ab122         1234               0001             AU123     99393
    01              ab122         0001               1982             AU123     99393
    01              ab122         1982               9929             AU123     99393
    04               hjsss         8839                8302            JK920     32320
    05              cg899         6728              32322           IKL020     65252
    07              vv353          7872               0919             FV982     78282
    07              w353          0919                8282            FV982     78282
    hot to get this result, any help is much appreciated..
    Thanks,
    AK.

    Yes you are right, I took it down to edit this in that time you have posted the message...
    Question:
    Table data need to be sorted by matching old_id with new_id
    actual table : here rows are randomly arranged
    Table X
    CODE             CASE              OLD_ID                NEW_ID            PERSON       AUTH
    01              ab122         1234               0001             AU123     99393
    07              vv353          7872               0919             FV982     78282
    01              ab122         1982               9929             AU123     99393
    04               hjsss         8839                8302            JK920     32320
    01              ab122         0001               1982             AU123     99393
    05              cg899         6728               32322           IKL020     65252
    07              w353          0919                8282             FV982     78282
    output table: here if you see old_id of row 2 is matched to new_id of row 1.. and so on
    Table X
    CODE             CASE              OLD_ID                NEW_ID            PERSON       AUTH
    01              ab122         1234               0001             AU123     99393
    01              ab122         0001               1982             AU123     99393
    01              ab122         1982               9929             AU123     99393
    04               hjsss         8839                8302            JK920     32320
    05              cg899         6728              32322           IKL020     65252
    07              vv353          7872               0919             FV982     78282
    07              w353          0919                8282            FV982     78282
    so, I need a query where I can generate this output..

  • How to Empty all rows within a Power Pivot Model

    Hi,
    I would like to know how to empty all rows within a Power Pivot model. I am in the process of creating quite a complex Power Pivot model. This means I need to create some sort of primitive version control process, e.g. stored multiple backups of the Power
    Pivot model without the data.
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Forget what I've said before:
    Have a look at Gil's thread here:
    https://social.technet.microsoft.com/Forums/en-US/40abe021-1abd-4a2a-bf33-a035847fb7be/disconnect-datamodel-from-source?forum=powerquery
    For Power Pivot it means that you can get rid of all your data, but Keep Relations, measures, ..everything.
    Just import your tables once in order to get the connections right and move on.
    Imke

  • Accessing and comparing rows from resultset

    Post Author: pross
    CA Forum: Formula
    I am a newbie, and this might be a simple answer ( I hope so)
    I would like to compare rows inside my result set. For example, if I recieve information such as:
    CUSTOMER:12345 AMOUNT:100.00 CUSTOMER:12345 AMOUNT(100.00) CUSTOMER:2345 AMOUNT:75.00 CUSTOMER:4567 AMOUNT:25.00
    I want to be able match the same customer number and amounts that balance out &#91; 100.00 and (100.00)&#93;, to not show in my report.
    How can I do this?
    Thanks                    

    Post Author: pross
    CA Forum: Formula
    I am returning rows that match my criteria. Because of the way the data is stored, it shows a record that has a positive value (a charge) and a negative value for the same criteria (a payment). I want to only show records that do not have a negative value, as well as the record that shows the charge for that record. For instance I want to be able to match everything in my row as well as the amounts from those two rows sum to 0. I am not sure how to do this in a sql query or be able to filter it out in CR.

  • Referencing rows within a table

    Hi all,
    I don't know if this has been brought up before, and believe me I have looked, but here goes...  I have a table with many tens of rows.  Cell 1 of those rows is a checkbox with the exit event scripted as (formcalc)
    if 
    (this.rawValue == "1") then
    form1.Main_Subform.GeneralTable.Row1.presence
    = "visible"
    else   form1.Main_Subform.GeneralTable.Row1.presence = "hidden"
    endif
    What I want to do is not have to put the above script in each event of each checkbox.  So is there a way of referencing all the checkboxes at once and having the same result of making the associated row go hidden if not checked?
    Also, I have a reset button for the form that I want to be able to reset all row presences to visible when clicked.  I should mention here that the form has several tables all with checkboxes in cell one and all with add buttons that addInstances at the bottom of the tables that I do not want reset with the reset button.  In short, the tables list controlled documents that need to be reviewed annually and that because of the sheer volume of them will need to be parsed out, and the parsing may or may not be entire tables and the tables need to be able to be added to.  Here is what I have regarding the reset of the presences of the rows (I have only just begun):
    xfa.host.resetData();
    form1.Main_Subform.GeneralTable.Row1.presence
    = "visible";form1.Main_Subform.GeneralTable.Row2.presence
    = "visible";form1.Main_Subform.GeneralTable.Row3.presence
    = "visible";form1.Main_Subform.GeneralTable.Row4.presence
    = "visible";
    So my question regarding the reset button is...  Is there a way of resetting the presences of all rows within either all tables or each table without listing each and every row individually within the click event of the reset button?
    Thank you all in advance.  -rpeterson

    Hi,
    You can add one more button to your form. On click event of this button you can put script, which will loop througth all rows of your table and check checkbox, if it will be checked then hide is bot - leas as it is.
    If you want to hide row after click on checkbox, you have to put scripts to each of it.
    BR,
    Paul Butenko

  • Highlighting different rows within a JTable

    I have a JTable that has 20 rows. I also have a Jlist next to the JTable. When someone selects something within the Jlist I want to highlight certain rows depending on what was selected within that list. For instance if a user selects Item1 within the list I want to highlight the 3rd, 8th and 11th row within a JTable. The problem is the JTable API will let you highlight a number of rows but not allow you to specify single rows to highlight at one time. When I run my code to do this I get the last row highlighted. The reason is because the 3rd and 8th row do get highlighted but when I call the setRowSelectionInterval(i, i); where i is the row to highlight it has already passed and will end up highlighting the 11th row only. Is there any work around for this?

    First, make sure you table supports multi-select. Turn it on in this case, otherwise you can't select multiple items.
    To color different rows, you'll have to set a cell renderer and use it to color those rows. It's possible to collor each and every cell a different color, set fonts, images, etc..you just need a good cell renderer.

  • Can't compare a row with other rows within a table.. (many to many compare)

    Hi all..
    I am very new to PL/SQL..
    I need to travers through a table for comparing it's rows with in the table with other rows. For this I am trying to use bellow Pl/sql.
    create or replace compare()
    Declare
    VAR_HIT CHAR(1);
    SEARCH_RECORD_DATA UDB.table1%ROWTYPE;
    CANDIDATE_RECORD_DATA UDB.table1%ROWTYPE;
    CURSOR SEARCH_RECORDS_CURSOR IS SELECT * FROM UDB.table1 order by registration_id;
    CURSOR CANDIDATE_RECORDS_CURSOR IS SELECT * FROM UDB.table1 order by registration_id;
    BEGIN
    FOR SEARCH_RECORD_DATA IN SEARCH_RECORDS_CURSOR LOOP
    FOR CANDIDATE_RECORD_DATA IN CANDIDATE_RECORDS_CURSOR LOOP
    IF (CANDIDATE_RECORD_DATA.DECISION='P') THEN
    VAR_HIT:='y';
    IF(CANDIDATE_RECORD_DATA.FIRST_NAME!='unknown') AND (CANDIDATE_RECORD_DATA.FIRST_NAME!=SEARCH_RECORD_DATA.FIRST_NAME) THEN
    VAR_HIT:='n';
    ELSIF(CANDIDATE_RECORD_DATA.LAST_NAME!='unknown') AND (CANDIDATE_RECORD_DATA.LAST_NAME!=SEARCH_RECORD_DATA.LAST_NAME) THEN
    VAR_HIT:='n';
    ELSIF(CANDIDATE_RECORD_DATA.BIRTH_DATE!='unknown') AND (CANDIDATE_RECORD_DATA.BIRTH_DATE!=SEARCH_RECORD_DATA.BIRTH_DATE) THEN
    VAR_HIT:='n';
    ELSIF(CANDIDATE_RECORD_DATA.GENDER!='U') AND (CANDIDATE_RECORD_DATA.GENDER!=SEARCH_RECORD_DATA.GENDER) THEN
    VAR_HIT:='n';
    ELSIF(CANDIDATE_RECORD_DATA.FATHER_NAME!='unknown') AND (CANDIDATE_RECORD_DATA.FATHER_NAME!=SEARCH_RECORD_DATA.FATHER_NAME) THEN
    VAR_HIT:='n';
    ELSIF (CANDIDATE_RECORD_DATA.MOTHER_NAME!='unknown') AND (CANDIDATE_RECORD_DATA.MOTHER_NAME!=SEARCH_RECORD_DATA.MOTHER_NAME) THEN
    VAR_HIT:='n';
    END IF;
    IF(VAR_HIT='y') THEN
    INSERT INTO UDB.BIO_DI_HIT_RESULT(REGISTRATION_ID,SEARCH_ID,HIT_CANDIDATE_ID,SEARCH_DETAILS,CANDIDATE_DETAILS) VALUES (SEARCH_RECORD_DATA.REGISTRATION_ID,SEARCH_RECORD_DATA.EGM_NO,CANDIDATE_RECORD_DATA.EGM_NO,VAR_SEARCH_DETAILS,VAR_CANDIDATE_DETAILS);
    UPDATE UDB.BIO_RECORDS_DEMOGRAPHICS SET DECISION='D';
    END IF;
    END IF;
    END LOOP;
    commit;
    END LOOP;
    END;
    Outer loop is working fine (it is raversing throughout the table) (say for 8000 records 8000 times)
    But Enner loop is not working fine e.i. it's running just for 8000 times for 8000 records. while it should run more then 8000 time..
    Can any one help me..
    Is the way of using two cursor on one table for comparing each row of record is correct????????? :(

    Finally I come up with this:
    INSERT INTO UDB.BIO_DI_HIT_RESULT(REGISTRATION_ID,SEARCH_ID,HIT_CANDIDATE_ID,SEARCH_DETAILS,CANDIDATE_DETAILS)
    SELECT SEARCH.REGISTRATION_ID, SEARCH.Key_NO,CANDIDATE.Key_NO,
    'First name='||SEARCH.FIRST_NAME||',Last name='||SEARCH.LAST_NAME||',Birth date='||SEARCH.BIRTH_DATE||',Gender='||SEARCH.GENDER||',Fathers name='||SEARCH.FATHER_NAME||',Mother name='||SEARCH.MOTHER_NAME,
    'First name='||CANDIDATE.FIRST_NAME||',Last name='||CANDIDATE.LAST_NAME||',Birth date='||CANDIDATE.BIRTH_DATE||',Gender='||CANDIDATE.GENDER||',Fathers name='||CANDIDATE.FATHER_NAME||',Mother name='||CANDIDATE.MOTHER_NAME
    FROM UDB.BIO_RECORDS_DEMOGRAPHICS SEARCH,UDB.BIO_RECORDS_DEMOGRAPHICS CANDIDATE
    WHERE (SEARCH.FIRST_NAME!='unknown' OR SEARCH.LAST_NAME!='unknown' OR SEARCH.BIRTH_DATE!='unknown' OR SEARCH.GENDER!='unknown' OR SEARCH.FATHER_NAME!='unknown' OR SEARCH.MOTHER_NAME!='unknown')
    AND SEARCH.REGISTRATION_ID != CANDIDATE.REGISTRATION_ID
    AND SEARCH.REGISTRATION_ID < CANDIDATE.REGISTRATION_ID
    AND (SEARCH.FIRST_NAME='unknown' OR CANDIDATE.FIRST_NAME IN (SEARCH.FIRST_NAME,'unknown'))
    AND (SEARCH.LAST_NAME='unknown' OR CANDIDATE.LAST_NAME IN (SEARCH.LAST_NAME,'unknown'))
    AND (SEARCH.BIRTH_DATE='unknown' OR CANDIDATE.BIRTH_DATE IN (SEARCH.BIRTH_DATE,'unknown'))
    AND (SEARCH.GENDER='U' OR CANDIDATE.GENDER IN (SEARCH.GENDER,'U'))
    AND (SEARCH.BIRTH_DATE='unknown' OR CANDIDATE.BIRTH_DATE IN (SEARCH.BIRTH_DATE,'unknown'))
    AND (SEARCH.FATHER_NAME='unknown'OR CANDIDATE.FATHER_NAME IN (SEARCH.FATHER_NAME,'unknown'))
    AND (SEARCH.MOTHER_NAME='unknown' OR CANDIDATE.MOTHER_NAME IN (CANDIDATE.MOTHER_NAME,'unknown'))
    ORDER BY SEARCH.REGISTRATION_ID;
    Now it realy meet all my final table requirement.. I am happy.. :)
    But again last requirement is like..
    In the final BIO_DI_HIT_RESULT table I need to add one more column named as match_count
    This column will have values of total no. of exact match field (not unknown) for each records in the BIO_DI_HIT_RESULT.....
    One way of duing this is--
    Step1: I will use a cursor for traversing through each of the rows in BIO_DI_HIT_RESULT.
    Step 2: And based on count of matches in search_details(substring) and candiate_details(substring) I update each and every rows of the table.
    It will be very slow.. And for records like 2 million records.. I can't think of this idea. :(
    Sooooo,, Is there ANY BETTER WAY OF DOING THIS AS WELL.. BETTER MEANS FAST WAY.. :(
    Thanks in advance....
    Edited by: user13367608 on Jan 8, 2011 2:13 AM

  • How to compare rows in 2D array?

    Hi,
    I have a 2D array of binary.
    - I want to compare all rows against each other.
    - Two rows should be compared if they have only one different element.
    - The result of comparison should be a row with the different element assigned as 2 (or any number different from 0, 1).
    - Continue to compare the result rows against each other.
    - Repeat it until no row can be compare (those final rows should be presented).
    Any idea will be appreciated!
    Solved!
    Go to Solution.

    sangquang wrote:
    I have a 2D array of binary.
    "Binary" is not a type. deep down, everything is binary one way or another. What do you actually have?
    sangquang wrote:
    - Two rows should be compared if they have only one different element.
    You have your oder of operations mixed up! You need to compare them first before you know if they have different elements.
    sangquang wrote:
    - The result of comparison should be a row with the different element assigned as 2 (or any number different from 0, 1).
    Please explain
    sangquang wrote:
    - Repeat it until no row can be compare (those final rows should be presented).
    Presented how? To the user? Does that mean all the result of the earlier row comparisons should not be presented? Why not?
    You post makes very little sense. Please attach a simple VI that contains a simple example of your 2D array (make current value default before saving). Then tell us what kind of result you would expect.
    LabVIEW Champion . Do more with less code and in less time .

  • Specific number of rows within field(s)

    I'd like to get Top-N of Amt within Name&Loc as shown below.
    Is there a way to reset either COUNT or ROWNUM to get this result?
    Name---Loc--(ROWNUM)--Amt
    James--abc--------1--1000
    James--abc--------2---900
    James--abc--------3---750
    James--def--------1---500
    James--def--------2---300
    Jill---abc--------1---400
    Jill---abc--------2---150
    Jack---xyz--------1--2000
    Jack---xyz--------2--1800
    Thank you in advance for your help.

    try this,
    select rownum as rank,ename,sal from ( select ename,sal from emp order by sal desc) where rownum<6
    This query works on EMP table of SCOTT user.
    If you change "desc" to "asc" it will start from lower to higher values. You can also play with the condition ( rownum < 6 ) to fetch ur desired no. of rows.
    Hope this helps,
    Kalpen.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Danielle:
    Thanks for the reply, but that's not what I'm looking for.
    Is there a way to get the Top-N (top 10,top20...)records within a group of fields (e.g. Name & Loc )?<HR></BLOCKQUOTE>
    null

  • Comparing row values in two different tables

    Hello,
    Does anyone know if it is possible to compare (and possibly highlight - which I know can be done) row values in two different tables?
    I have a ZIP Code column in table A that I want to compare to a ZIP Code column in table B and highlight those ZIP Codes that are present in table B but not in table A etc. Is this possible?
    Thanks,
    Kenneth

    To be able to apply conditional formatting, I must edit the formulas this way.
    =IF(ISBLANK(B)," ",IF(ISERROR(VLOOKUP(B,Tableau 2 :: B,1,0))," ",VLOOKUP(B,Tableau 2 :: B,1,0)))
    =IF(ISBLANK(B)," ",IF(ISERROR(VLOOKUP(B,Tableau 1 :: B,1,0))," ",VLOOKUP(B,Tableau 1 :: B,1,0)))
    I replaces the four empty strings by strings containing one space character.
    In the field supposed to contain the text which is not contained I just entered a single space character.
    Yvan KOENIG (from FRANCE vendredi 12 septembre 2008 20:52:11)

  • Repeated Header Row within a Details Section Only of a Group Ignores Tablix Member Properties

    Ok.  I have a situation where I have a details section of a group, and I am trying to get it to repeat the row headers on each page.  It's not working.  I've gone into Advanced Mode, and addressed the static Tablix Member for the left-most
    field of the header row in question, set the properties for the Tablix Member to "RepeatOnNewPage:  True" and "KeepWithGroup: After", and still, it refuses to repeat the row header for these details.  I've tried rebuilding and
    not deleting the column where the grouping was originally assigned (without deleting the grouping, of course), and assigned the properties for "RepeatOnNewPage" to that left-most, grouping field, yet I get the exact same results.  I've looked
    up solutions, and even spoken to the expert of experts, but no joy here.  I'm using VS'10.

    OK.  So it is fixed... sort of...
    Apparently, you must select to add group headers repeated as you create the group (inc. child group), BESIDES changing in Advanced Mode, Tablix Member /Properties / etc.   Then you have to format that extra column within your Tablix to
    make it appear to 'disappear'.  BUT EVEN THEN, there is a new problem:
    The headers will repeat on the additional pages, but only to a point.  For some odd reason, SSRS doesn't consistently render the repeated headers of the group details for
    every page, just where it is a hard (page) break, as opposed to a soft (page) break.  My gut tells me that this has nothing to do with the .xml code, but is an SSRS idiosyncrasy. 

Maybe you are looking for

  • 6A 80 on loading import.cap

    Greetings! I have problem with loading applet into java card. I load it with my program, but the same problem persist in JCOP tools as well. Hence the problem is not my uploader. Here is the trace from my prog: > => 84 82 00 00 10 F7 31 F6 11 E8 10 8

  • Having problems switching itunes from pc to mac

    I downloaded the migration assitance and tried to use, but nothing happened. I then tried to use external storage to transfer my itunes from my pc to new mac and pc said that the itunes file was to large to download. I am stuck! Does anyone have an i

  • Unknown Messages coming in SXMB_MONI

    Hello Experts, In Production server in MONI i am getting many  red colur flag messages with no receiver found with Sender Name Space http://sap.com/xi/APPL/Global2 and SENDER SERVICE INTERFACE ServiceAcknowledgementERPNotification_Out How to fix this

  • OCCI ResultSet- getString Linux problem

    Hello, On forum I found how the solve problem for OCCI programm witch using MSVC++. May be anybody known how to correct compile and linking OCCI demo on Linux? The demos crashed at ResultSet->getString().

  • WTR54GS can't connect on office network?

    Ok here is my current setup at the office and I am trying to add WTR54GS to the mix. DSL MODEM --> old router (not linksys)--> hub-->wired to office jacks | From the office jack interface can I connect the WTR54GS? Basically I am trying to create a w