Last Dept Description record

 5 Replies
 0 Subscribed to this topic
 68 Subscribed to this forum
Sort:
Author
Messages
lmackin
Basic Member
Posts: 4
Basic Member
    I'm running a crystal report and pulling in Department description. In some cases their are multiple records coming over due to changes within the departmement code. How do I only pull the last record?
    Margie Gyurisin
    Veteran Member
    Posts: 538
    Veteran Member
      What tables are you joining? Without knowing that, I am not sure. You could try joining by company, process level and dept code.
      lmackin
      Basic Member
      Posts: 4
      Basic Member
        I'm actually starting with the HRSUPER table to identify our supervisors. Then they wanted additional information for the employee who is associated with that code, including their Dept, Dept descrip, Loc code, loc descrip etc..
        a screen shot of my tables is attached.
        Thanks
        Attachments
        Margie Gyurisin
        Veteran Member
        Posts: 538
        Veteran Member
          Without knowing the structure of your HR02 records, I will suggest that you add some joins from employee to deptcode to include company and process level.

          lmackin
          Basic Member
          Posts: 4
          Basic Member
            ok - I will try that! Thanks
            Kelly H
            Veteran Member
            Posts: 167
            Veteran Member
              I agree with Margie - you need to join the dept table to the employee's process level on the employee table. As well as company.

              do your departments to inactive when no longer being used? That may be another way to weed out the "older" descriptions.