Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Posts
    1

    Unanswered: inverting the recordset

    To all: This is my first time posting here. Any input would be greatly appreciated.

    Below is a SQL statement that I am using in my MS Access database.

    (I know this is the MySQL discussion forum, but this is more of a SQL question than it is an Access question.)

    My problem is that I want the opposite recordset than what this SQL statement produces.

    In my test database, there are three records in the table tblFoods. This SQL statement returns two of those three records. I would like, instead, to have the other (one) record returned.

    What is the best/easiest way of inverting this recordset?

    Any input would be greatly appreciated.

    Thx,

    CJinMadison

    --- START SQL STATEMENT ---

    SELECT tblPatients.PtID, tblFoods.FoodDescr
    FROM tblFoods
    INNER JOIN (tblFoodConflict
    INNER JOIN (tblPatients
    INNER JOIN tblPatientConflict ON tblPatients.PtID =
    tblPatientConflict.PtID)
    ON tblFoodConflict.AlgyDietID = tblPatientConflict.AlgyDietID)
    ON tblFoods.FoodID = tblFoodConflict.FoodID;

    --- START SQL STATEMENT ---

  2. #2
    Join Date
    May 2009
    Posts
    5
    Hi!

    Give us concrete examples. If possible show us the tables with some (unreal) data.

    Peace!

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    is this a general question on SQL.. if so AnSI sql may well be the appropriate section, if its about MySQL then here is fine. if you want to do that in access then ask the question in Access

    its all to do with your join statement.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •