ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Need help dis ciphering code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by Vectorspace View Post
    If this is your SQL:
    "MBCODE, count(*) from qtemp/edipf group by MBCODE order by MBCODE"
    Then it is fine. For each distinct MBCODE in file EDIPF, you will get the number of instances of that MBCODE in EDIPF

    Your Excel is doing something different though - For each code, you have four different columns that sum to the total? Is that not looking at EDIPF?
    the Excel is just a breakdown of the different EMDID and sums up everything on the very right. My concern is that SNT and T/F totals are different, which happens to be the only ones that adds the totals from multiple EMDIDs, so I was wondering if my query incorrectly counts multiple records in EDMAST, which was your original concern. Hope that makes sense

    Comment


    • #17
      Hard to tell without seeing all the data and the excel formulas.

      Try using the Exists method from my previous post and see if that changes things

      Comment

      Working...
      X