Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jonathangr

  1. jonathangr

    Query help needed (getting wrong results)

    Oh I see! It seems to work great. Thanks for your help. I'll know for next time :)
  2. jonathangr

    Query help needed (getting wrong results)

    I haven't found the problem but I found a way to bypass it. It seems like the times there are multiples entries for the same NIP, the CountNIP result is multiplied the number of times the NIP appears witch I find wierd since I use DISTINCT. Anyway, I made a function to divide CountNIP by the...
  3. jonathangr

    Query help needed (getting wrong results)

    Hello again, Here are a part of the results of my query and expected results by manually counting the NIPs in EF1 and EF2: NIP CountNIP Expected 2062 9 3 2073 4 1 2264 3 3 2265 1 1 2266 8 2 2267 1 1 2268 5 5 2272 1 1 2274 20 5
  4. jonathangr

    Query help needed (getting wrong results)

    I don't know if this changes something but in table1, some NIPs come several times (The primary keys are Fct, NIP, Month and Year). I've already tried DISTINCT(NIP) in the SELECT but I get the same wrong results
  5. jonathangr

    Query help needed (getting wrong results)

    thanks for your answer unfortunatly, the results are the same (wrong) :(
  6. jonathangr

    Query help needed (getting wrong results)

    Sure, here's some example data: table1: Fct NIP Month Year FR FM PS -------------------------------------------------- 2 2266 5 2005 5 0 No table2: Form EF1 EF2 Day Month Year Period ---------------------------------------------------------- 507 2264 2290...
  7. jonathangr

    Query help needed (getting wrong results)

    Hello I am getting wrong results with my query so I hope you can help me check what the problem is. What I want to do is to count the number of times a field (NIP) is in field EF1 or in field EF2. Here's my query: SELECT table1.NIP, Count([table2]![EF1] And [table2]![EF2]) AS CountNIP FROM...

Part and Inventory Search

Back
Top