Search results

  1. J

    Stop duplicate controls in subquery

    Note - all example data information below is completely made up! I am using Microsoft Access 2010. I have a table with patients who have a disease (disease) I have a table with patients who do not have a disease (controls) Whether disease or control they have gender (male/female) and a...
  2. J

    Find the next record by date for a person and compare it to their initial record

    I've tried that - it doesn't seem to work. The NextDate column is filled with the same date for all of them.
  3. J

    Find the next record by date for a person and compare it to their initial record

    Is this not already normalised? I don't see any repetition of data. Do you propose I have a table for resultA where "N" or "P" correspond to person_id and date? This doesn't seem to make a great deal of sense to me. In additional I have no idea how I would move this mass of data into a more...
  4. J

    Find the next record by date for a person and compare it to their initial record

    I'd be very grateful for any help on this Access scenario. I have a massive table (tbl) with: id, person_id, date, resultA, resultB, resultC, resultD with about 20000 results. e.g. id 1 person_id 2 (Joe Bloggs (made up name)) result on date (01/01/2012) resultA (P), resultB (N), resultC...
  5. J

    INNER JOIN query - need to exclude duplicate entries in control table

    It's a good question. I guess it would simply be first come first served. So ID 1 get's a pick of them all and ID 100 has much less to choose from. It is possible that I do not need to worry about having duplicate controls - it is not the end of the world - I just wondered that by avoid...
  6. J

    INNER JOIN query - need to exclude duplicate entries in control table

    Thank you for your continued help. I can try and get some data in due course. Your point of "how come you don't want Matched Control 2 for Disease X 2" is because there is a large excess of matched controls and once one is "used up" on another disease X I don't want it to appear again as there...
  7. J

    INNER JOIN query - need to exclude duplicate entries in control table

    I will look into the use of grouping tomorrow. I want the output of the query to be: Disease X 1 -> Matched Control 1 Disease X 1 -> Matched Control 2 Disease X 1 -> Matched Control 4 Disease X 2 -> Matched Control 2 <----- I do not want to use this control again Disease X 2 -> Matched Control...
  8. J

    INNER JOIN query - need to exclude duplicate entries in control table

    I have a table with people that have disease X - tbl:[Disease X]that are being matched to disease-free "controls" tbl:[Controls] ensuring that they match gender and location. Currently I have an inner join that looks something like this: SELECT blah blah blah FROM [Controls] INNER JOIN...
  9. J

    Selecting top 2 rows of a sorted table for EACH Person ID

    Thank you so much recyan, I really appreciate it. Solution works very well.
  10. J

    Selecting top 2 rows of a sorted table for EACH Person ID

    I am working on a project with MS Access 2010. A person with an illness needs to matched against two people without the illness, or controls. These two controls need to be the nearest in terms of age as possible. I have matched suitable controls but I am struggling to make a query to select...
Back
Top Bottom