Repeating Records

Hi All
I am stuck at an issue which is to remove duplication.
Following is scenario.
I have 4 tables as follows.
1.Deploybase(DeployId)
2.LicenseHistory(DeployId,UserId)
3.Users(UserId,User_Detail_id)
4.UserDetails(User_Detail_id)
Tables are joined using below joins.
Deploybase.DeployId=LicenseHistory.DeployId
LicenseHistory.User_id=Users.User_id
Users.User_Detail_id=UserDetails.User_Detail_id
When I join LicenseHistory,Users,UserDetails, all records are unique.
But the issues is
LicenseHistory table has duplicate records for DeployId column which is used to join table Deploybase.
As a result when I join it to Deploybase, it gives me repeating entries which I don't want
I want Comments from LicenseHistory,Login from Users and User_name from UserDetails. There are multiple columns from 1st table i.e. Deploybase which I need.
After reading on Exists operator, I made following query.
Select DeployId,comment from (select comments as comment,deploy_id as DeployId from LicenseHistory slh where
exists
(select deploy_id from symdb.symdb_deploybase sdb) and slh.comments is not null)
Above query gives me results from LicenseHistory table only. But I don't know how to add tables Users,UserDetails
Friends, pls suggest me for this query or If you have any alternate query and logic.
Thanks

Why are there multiple records in LicenseHistory for a deployid, userid combination? From the name of the table, it sounds to me like it might also have a date column, a sequence column, or some other column that might indicate which of the multiple records is the "current" record.
If that is the case, then you need to use that column to further filter the licensehistory table to get only the current records for each deployid, userid combination. Without knowing what that column is, it is difficult to give any concrete solution.
John

Similar Messages

  • I can't build an xsd for a flat file (txt) to handle repeating records

    Hi - have looked at many posts around flat file schema and they don't seem to address my question.
    I have a flat file that is \n delimited
    the pattern of the data is simple:
    record1 - 90 characters
    record2 - 20 characters
    record3 - n 248 characters - each of these records is parsed into children by the positional method
    record n+1 10 characters
    record n+2 20 characters
    so I used the flat file schema generator to generate the schema and built a map mapping the flat file schema to another xml schema. The schema looks ok - record1, record2, record n+1, record n+2 are child elements of the root. the repeating record
    section is showing up as a node with the parsed children.
    The transform is only mapping the children of the repeating records. When I test the map only the first repeating record gets parsed. No repeating happens (the actual flat file has 400+ repeating records). When I run the map in debug mode, the input
    xml shows that record1 is read in correctly, record2 is read in correctly, record3 is read in and parsed and record4 is treated like record n+1 and record5 is treated like record n+2 and the map thinks it's all finished.
    the section of the repeat part of the schema is and you can see that I set the minOccurs=1 and maxOccurs=unbounded for the node (INVOICE) and the complexType but this is not an affective syntax. I have looked at how the EDI X12 schema look and how they handle
    looping and it is a lot different than what the Flat File schema wizard is doing. Is there a good set of rules published that would guide me though this? otherwise I will basically have to read in the lines from the file and parse them out with functoids -
    seems so inelegant. Thanks in advance.
    <xs:element minOccurs="1" maxOccurs="unbounded" name="INVOICE">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo structure="positional" sequence_number="3" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
    />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence minOccurs="1" maxOccurs="unbounded">
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003"
    />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element name="SegmentType" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="2" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>....... more children elements
    Harold Rosenkrans

    Thanks for responding
    I gave up trying to parse the repeating record into fields. Instead I just loop through the repeating record section with an <xs:for-each> block in the xsl and use functoids to grab the fields.
    So that works for having the two, shorter header records (structure is positional) before the section of repeating records. Now I just have to figure out how to get the schema to handle the two, shorter trailer (or footer, whatever you prefer) records after
    the section of repeating records
    the error I get in VS when I test the map is [BTW I changed the element names in the schema which is why you don't see INVOICE in the error]
    When I declare the last element as being positional with a character length of 10 I get the error:
    Error 18 Native Parsing Error: Unexpected end of stream while looking for:
    '\r\n'
    The current definition being parsed is SAPARData. The stream offset where the error occured is 1359. The line number where the error occured is 9. The column where the error occured is 0. 
    so the first record is 77 char in length and the second is 16 char and then the repeating records (5 in the file) are 248 char and the last record is 10 char
    so an offset of 1359 puts it beyond the last record by 16 characters - so the stream reader is looking for the next repeating record.
    if I try to declare the last element as delimited I get the error:
    Error 14 Native Parsing Error: Unexpected data found while looking for:
    '\r\n'
    The current definition being parsed is SAPARData. The stream offset where the error occured is 597. The line number where the error occured is 5. The column where the error occured is 0. 
    so the first record is 77 char in length and the second is 16 char and then the repeating records are 248 char.
    a stream offset of 597 puts me 8 characters into the third repeating record - at this point I have only declared one trailer record in the  schema, 10 characters long.
    Why is stream reader stopping at such a weird spot?
    The bottom line is I still haven't discovered the correct schema to handle the trailer records. even if I set the maxOccurs="4" (for the repeat record declaration) it still gets the first error. How does it find an unexpected end of stream looking
    for \r\n when the maxOccurs for the repeat record declaration should have the stream pointer in the 5th repeat record.
    I unfortunately don't have any options concerning the file structure.
    I have read a lot of posts concerning the trailer issue. I have seen a couple that looked interesting. I guess I'll just have to give them a try. The other option is to create a custom pipeline that will only take file lines of 248 characters.
    That's just disgusting !
    Harold Rosenkrans

  • Mapping with repeating records

    Hello,
    I have once schema which has two child records out of that second child has many child fields with repeating records, but when I mapped it further I am getting that second schema only once even it has multiple.
    Help me please ASAP
    Thanks in advance

    Nilesh,
    You have two options:
    Option1:
    Just ensure in schemas, in second child records, set the repeating child record's (repeating record under second child record) "Max Occurs" property is set to
    * (or unbounded). Ensure that this property (Max Occurs =
    *) is set for repeating records in both source and destination schemas. By this way, particular child record will repeat. This way gives more control on which child record you want to
    set as repeatable.
    Options2:
    Just set the second child record (which has the repeating records under it) "Group Max Occurs" property to
    * (or unbounded). By this way, all the child records of this second child, will be set to repeating record.
    Also ensure that the repeating records (not just the child elements, but also the repeating records) are mapped from source to destination.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How to highlight the repeated records in a BO crystal report?

    Hi ,
    How to highlight the repeated records in a BO crystal report?
    we want to highlight the rows for which account number is same.
    thanks
    sriram

    You don't even need to create a group.  Just sort the records on the fields that define "duplicate".  Then you can just use
    if {field} = PreviousValue({field}) then crYellow else crNoColor
    in the format's Background Color formula.  This will cause the background to be yellow on duplicates.  (If you need to check more than one field in order to determine duplicates, just insert
    and {field2} = PreviousValue({field2}
    and so on for each field that needs to be checked.
    HTH,
    Carl

  • How to Disassemble Varying Multiple Repeating Records from Single Row

    I have a flat file that has hundreds of thousands of rows.  Each row is a new record.
    On each row there are about 23 elements that occur once per row and then there are two groups of 4-6 fields each group that repeat a certain number of times.  There is an integer field before each group that indicates how many times the group repeats
    0 or greater.  An few examples rows are the following. 
    a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|0|0
    a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|1|b|b|b|b|0
    a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|2|b|b|b|b|c|c|c|c|0
    a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|2|b|b|b|b|c|c|c|c|1|d|d|d|d|d|d
    a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|2|b|b|b|b|c|c|c|c|2|d|d|d|d|d|d|e|e|e|e|e|e
    a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|0|1|b|b|b|b|b|b
    a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|0|2|b|b|b|b|b|b|c|c|c|c|c|c
    I'd rather not do a custom pipeline if possible unless there is something already written.
    thanks in advance.

    Thank you for the quick response.  Would rather stick in biztalk if possible.
    I was able to get something like this to process through no problem.
    a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|1|b|b|b|b
    a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|0
    Just using and unbounded record with the group order type set to sequence. each row could have 0 to hundreds
    of groups.  And I've been able to process files with millions of rows.
    I'm wondering if there is a way to check the integer number in order to tell the group how many records
    there will be?
    Sucks that it is all the same delimiter.

  • Repeating records for element values

    Hi,
    Need to get element input values,i have used pay_element_entry_values table to get he screen inpout value.Used the effective date to filter,still 2 records are fetched.
    E.g query
    SELECT DISTINCT papf.national_identifier, papf.employee_number,
    papf.full_name, paaf.payroll_id, pop.org_payment_method_name,
    pap.payroll_name,
    (SELECT SUM (screen_entry_value)
    FROM pay_element_entry_values_f
    WHERE element_entry_id(+) = pee.element_entry_id
    AND pee.element_type_id = '314') basic
    FROM per_all_people_f papf,
    per_all_assignments_f paaf,
    pay_org_payment_methods_f_tl pop,
    pay_personal_payment_methods_f ppp,
    pay_assignment_actions_v paa,
    pay_all_payrolls_f pap, --pay_element_links_f pel,
    pay_element_entries_f pee,
    pay_element_types_f pet,
    pay_element_entry_values_f peev
    WHERE papf.person_id = paaf.person_id
    AND paaf.assignment_id = ppp.assignment_id
    AND ppp.org_payment_method_id = pop.org_payment_method_id
    AND paaf.assignment_type = 'E'
    AND paaf.effective_end_date = '31-Dec-4712'
    AND paaf.assignment_id = paa.assignment_id
    AND paaf.payroll_id = pap.payroll_id
    AND paaf.assignment_id = pee.assignment_id
    AND pet.element_type_id = pee.element_type_id
    AND peev.element_entry_id(+) = pee.element_entry_id
    AND paa.effective_date >=
    TO_DATE ('01-' || :p_start_date,
    'DD-MON-YYYY')
    AND paa.effective_date <=
    LAST_DAY (TO_DATE ('01-' || :p_start_date, 'DD-MON-YYYY'))
    AND peev.effective_start_date <=
    TO_DATE ('01-' || :p_start_date,
    'DD-MON-YYYY')
    AND peev.effective_start_date <=
    LAST_DAY (TO_DATE ('01-' || :p_start_date, 'DD-MON-YYYY'))
    GROUP BY papf.national_identifier,
    papf.employee_number,
    papf.full_name,
    paaf.payroll_id,
    pop.org_payment_method_name,
    pap.payroll_name,
    paaf.person_id,
    pee.element_entry_id,
    pee.element_type_id
    i get one saved entry values with a null value.Please advice.
    Regards,
    GD

    It's not completely clear what you want.
    Are you talking about needing to repeat parameters in your query?
    e.g.
    procedure myroc (p_val1 in varchar2, p_val2 in varchar2 := null, p_val3 in varchar2 := null, p_val4 in varchar2 := null) is
    -- assume at least 1 value is passed in
    SELECT   DISTINCT DECODE (MD.MDFR_CODE,p_val1,NVL (MD.MDFR_CODE, 0),
                              p_val2,NVL (MD.MDFR_CODE, 0),
                              p_val3,NVL (MD.MDFR_CODE, 0),
                              p_val4,NVL (MD.MDFR_CODE, 0))             AS MDFR_CODE
      FROM   MODIFIER MD, MODIFIER_STATUS MS
    WHERE       MD.MDFR_CODE IN (p_val1, coalesce(p_val2,p_val1), coalesce(p_val3,p_val1), coalesce(p_val4,p_val1))
             AND MD.MDFR_CODE = MS.MDFR_CODE
             AND MS.OPRTNL_FLAG = 'A';
    ...

  • Suppressing repeated records in the query

    Hello Gurus,
           I have a Doctor#1 treating Patient#1 in 3 different cases and in the report I just need to see 1 instead of 3 as it is the same patient#1 to the same doctor#1. What are the ways I can manipulate this data without writing any program.
    Report shows as follows:                   records
    doctor 1       disease 1     patient 1         1 
                   disease 2     patient 1         1
                   disease 3     patient 1         1
    total                                          3   
            Any help i.e can I write conditions? Selections? or any idea would be greatly appreciated.
    Thanks,
    Priya

    Hello Diwa,
            I did select (hide the repeated key values) in the query properties and also hid the diseases column but still it shows as below.
    Doctor       Patient         Number of Records
    00000403880040     A05088000490040            1
                                     1
    Total                                  2
    Thanks,
    Priya

  • Repeat Records in query

    Hi Friends,
    I want to create a query which will return me frameno appears more than ones.
    means list of repeat jobs.
    for that i have created counter as CKF summetion on jobcardno,
    and applied condition as counter>1.
    now my report is shows me correct count of frameno which appears more than one but if i put jobcardno in rows it shows me counter=1 and as per condition no records are displayed.
    i want jobcardno also in rows. what should i do???????
    cols : CKF : Counter
    rows : Char : model, Frame No, Jobcard No
    in short : i want to find it out repeat jobs for frameno and jobcardno wise, it should not show me non repeated frameno & jobcardno.
    Regrds,
    Suyash

    .

  • Deletting repeated record in fields

    hiiiiiii to all ,
    i have some problem regarding eliminating the repeated entries
    for example
    field 1                    field2            field3               field4               field5
    5100000245         46,506.80     3,160.00             154,496.80     18729521
    5100000248          5,940.00     290,604.28     132410            18729001
    5100000248          5,940.00     290,604.28     132410            18729001
    in this case i want only this type of record
    field 1                    field2            field3               field4               field5
    5100000245         46,506.80     3,160.00             154,496.80     18729521
    5100000248          5,940.00     290,604.28     132410            18729001
    5100000248          5,940.00     
    so what can i do plz tell me any solution

    Hello Pranay,
    This code will solve it :
      DATA  : current_tabix LIKE sy-tabix.
      LOOP AT itab.
        current_tabix = sy-tabix - 1.
        "Loop on the same table -- before this line ( ! TO current_tabix )
        LOOP AT itab TO current_tabix
        TRANSPORTING NO FIELDS
        WHERE field1 = itab-field1
          AND field2 = itab-field2.
          EXIT.
        ENDLOOP.
        IF sy-subrc EQ 0.
          " if a line exists with the same field values
          " for field1 and field2 before this line
          " than clear field3 - 4 - 5
          CLEAR :
          itab-field3, itab-field4, itab-field5.
          MODIFY itab.
        ENDIF.
      ENDLOOP.
    I hope it helps.
    Edited by: Bulent Balci on Jul 3, 2010 4:00 PM

  • How can I map last of the repeating records into a single record?

    I have a following input schema, I need to take only one of the <Student> records and map that to a single record in output. Doesn't matter if the first, second or last one of the records get mapped, I only need one in the output. Any idea how can
    this be accomplished?
    Input:
      <Students>
        <Student id="1">
            <Name>
              A
            </Name>
            <Roll>
              1
            </Roll>
        </Student>
          <Student id="2">
            <Name>
              A
            </Name>
            <Roll>
              1
            </Roll>
        </Student>
        <Student id="3">
            <Name>
              A
            </Name>
            <Roll>
              1
            </Roll>
        </Student>
      </Students>
    Expected Output:
    <Candidate>
      <Student>
        <Name>
           A
        </Name>
      </Student>
    </Candidate>

    Sounds rather complex for something that could be done very simple in custom XSLT like this:
    <?xml version="1.0" encoding="utf-16"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="Students">
    <Candidate>
    <Student>
    <Name>
    <xsl:value-of select="Student/Name" />
    </Name>
    </Student>
    </Candidate>
    </xsl:template>
    </xsl:stylesheet>
    Morten la Cour

  • Function modules transfer  repeated records in Generic data source

    Hello Friends ,
    I have created a FM to extract the data from fields of  tables BKPF and BSEG .
    This functional module is used in the Generic data source.
    Now if I check in RSA3 for this Generic data source,
    the records are coming 10 times instead of a single time.
    Means one records at data base table is showing ten records in RSA3.
    Any help please.
    Regards,
    Amol.

    Hi Amol,
      Can you please check the Fetch statement that you are using after opening the cursor and selecting data into it. It should be in the format below.
    FETCH NEXT CURSOR S_CURSOR APPENDING CORRESPONDING FIELDS OF TABLE                                                 E_T_DATA PACKAGE SIZE S_S_IF-MAXSIZE.
    Also are you incrementing data package ID or not by using the statement  
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    Regards,
    Prakash B

  • Condition on Mapping in Repeating Records

    Hi,
    This is my map file :
    My input file is as follows:
    <ns0:Root xmlns:ns0="http://schemas.microsoft.com/BizTalk/2003/aggschema">
      <InputMessagePart_0>
        <ns1:Response xmlns:ns1="http://Interplx_ndPhase.SourceSchema">
          <Employees>
            <Employee>
              <EmpID>10</EmpID>
              <EmpName>Prakash</EmpName>
            </Employee>
           <Employee>
              <EmpID>20</EmpID>
              <EmpName>EmpName_0</EmpName>
            </Employee>
          </Employees>
        </ns1:Response>
      </InputMessagePart_0>
      <InputMessagePart_1>
        <ns2:ResponseM xmlns:ns2="http://Interplx_ndPhase.ManagerSchema">
          <Managers>
            <Manager>
              <ManagerID>30</ManagerID>
              <Salary>Salary_0</Salary>
            </Manager>
            <Manager>
              <ManagerID>20</ManagerID>
              <Salary>1000000</Salary>
            </Manager>
          </Managers>
        </ns2:ResponseM>
      </InputMessagePart_1>
    </ns0:Root>
    I want to compare each EmpID with each Manager ID.If any  EmpID and ManagerID is equal then simply transform with destination schema otherwise not.
    How its is possible ??
    Please suggest me some solution.
    Prakash

    For the given input instance, if you want map the employees who are managers (i.e. for the employee whose EmployeeID matches with the ManagerID) I created a output schema like the below to give an idea about the XSLT (which you can change it to
    yours)
    , in the map, If I use the XSLT like the following:
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0" version="1.0" xmlns:s0="http://Interplx_ndPhase.ManagerSchema" xmlns:ns0="http://schemas.microsoft.com/BizTalk/2003/aggschema" xmlns:ns2="http://Interplx_ndPhase.SourceSchema">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="/">
    <xsl:apply-templates select="/ns0:Root" />
    </xsl:template>
    <xsl:template match="/ns0:Root">
    <ns0:Root>
    <OutputMessagePart_0>
    <ns2:Response>
    <Employees>
    <xsl:for-each select="InputMessagePart_0/ns2:Response/Employees/Employee">
    <Employee>
    <xsl:call-template name="CheckMan">
    <xsl:with-param name="empID" select="EmpID/text()" />
    <xsl:with-param name="pos" select="position()" />
    </xsl:call-template>
    </Employee>
    </xsl:for-each>
    </Employees>
    </ns2:Response>
    </OutputMessagePart_0>
    </ns0:Root>
    </xsl:template>
    <xsl:template name="CheckMan">
    <xsl:param name="empID" />
    <xsl:param name="pos" />
    <xsl:for-each select="../../../../InputMessagePart_1/s0:ResponseM/Managers/Manager">
    <xsl:if test="ManagerID/text() = $empID">
    <EmpID>
    <xsl:value-of select="../../../../InputMessagePart_0/ns2:Response/Employees/Employee[$pos]/EmpID/text()" />
    </EmpID>
    <EmpName>
    <xsl:value-of select="../../../../InputMessagePart_0/ns2:Response/Employees/Employee[$pos]/EmpName/text()" />
    </EmpName>
    </xsl:if>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    You would get the desired output. As mentioned, you can change the output as per your need, and this XSLT which works for me for the above input & output schema can give an idea about how to achieve this requirement.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Merge Data Multiple records problem (repeats data)

    I'm tring to creat some cataloge pages with 4 images, codes, dicritons etc per page.
    i have a excel sheet which I've saved to a CSV file for a data source. i have a single page with the first record at the top and enogh room to repeat the record 4 times on the page. When I do the data merge I'v selected multiple records per page and put in all the settings and spacings I want.
    Everything looks fine when i click on the multiple reports prevew but when i do the actual merge most of the merges copy the same data with only a few records using different data. It's generating the correct number of records and pages with 4 records per page but repeatiing the same record,except for 2 records which were different before going back to the repeated record. Also the record it repeats is not the first record on the list, it's about the 6 of 16.
    I'm using CS5 version of Indesign.
    Any one have any sugestions to get it working corrctly or is this a fault wiyh CS5?

    Data SourceBefore MergeDuring mergeAfter Merge Page 1After merge Page 2After merge Page 3
    Thanks John seamed to help usiing PNG also made a difference shifting fiiles from our network drive onto personal desktop. As you can see attached are the screen shots.

  • Problem with update record, then link to file

    Environment:
    Dreamweaver 8, MySQL, PHP.
    I have a repeating record from my database. I added an Update
    Record server behavior for each search result for the result table.
    I added a button to the form and changed "submit" to "view".
    Pressing "view" is supposed to allow the user to view the detailed
    record information.
    The Update Record server behavior is supposed to do two
    things:
    1) add 1 to the 'numViews' filed of the record's database
    entry when the "view" button is pressed
    2) After updating the numViews field, the form is supposed to
    redirect the user to the detailed record
    I found that depending on how I create the record, I an do
    one of the above 2 behaviors, but not both. HELP!
    To add 1 to the numViews field, I created a form variable
    called incNumViews, which does the following:
    <?php echo $row_rsSearchResults['recipeNumViews']+1; ?>
    Very simple.
    The Update Record ends up changing the form action to the
    following:
    <?php echo $editFormAction; ?>
    Looking at the code for this, I ee the following:
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" .
    htmlentities($_SERVER['QUERY_STRING']);
    But when the "view" (ie: submit" button for the form is
    pressed, I get redirected back to the same repeating record search
    result page, not to the record detail page.
    However, the numViews field in the record is getting properly
    incremented.
    I tried to get around this by changing the Update Record
    behavior "After updating, go to:" field to point to the record
    detail page, and tried passing a parameter tot he recordID I want
    to see details of, as a URL parameter, but that does not work.
    If I change the Update Record form action from
    <?php echo $editFormAction; ?>
    to
    record_detail.php?recordID=<?php echo
    $row_rsSearchResults['recordID']; ?>
    Then I am able to link to the detail page, but NOT update the
    numViews field.
    HOW can I fix this to both update the record, then jump to
    the detail page with a URL parameter being passed, when I click the
    "view" (submit) button o the form??
    Thanks in advance.

    If the user's computer doesn't know what to do with a TIFF file, I guess that Open button would be missing.  Tiff is not a web normal file format, or even a common one for graphics applications....

  • Need to display records only once for that particular group

    Hi,
    I have a requirement like displaying repeated records only once for that particular group.
    For eg, in the emp table, I need to display repeated deptno only once for the particular group of job.
    And for the above requirement I have used the below query,
    SELECT empno, DECODE (LAG (job, 1) OVER (ORDER BY job), job, NULL, job),
    DECODE (LAG (deptno, 1) OVER (ORDER BY deptno), deptno, NULL, deptno)
    FROM emp;
    Output:
    EMPNO     JOB     DEPTNO
    7782          10
    7934     CLERK     
    7839     PRESIDENT     
    7876          20
    7788          
    7902     ANALYST     
    7566     MANAGER     
    7844          30
    7900          
    7654     SALESMAN     
    7698          
    But in the above output you can find that, say deptno 10 is getting displayed only once, whereas I want that deptno 10 to be checked whether it is getting repeated within the group of JOB and than hide the deptno 10 only if it is repeated within that job group. If not, deptno 10 should be displayed again.
    Please help me in this.
    Regards,
    Shiva

    Hi,
    Hope the below helps.
    SELECT emp_id, job, deptno,
           CASE WHEN LAG(deptno, 1) OVER (partition by job order by deptno) = deptno THEN null else deptno end
      FROM empRegards
    Ameya

Maybe you are looking for