Results 1 to 4 of 4
  1. #1
    sireesha is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    50

    query for using joins and not in list

    Hi,



    I have a list of 9 records in one table and 2 records in another table. and one more table is there. these three tables have relation.
    my result of the query is 2 records showing because these 3 tables have relation.
    but i want 9-2=7 other 7 records wants to display how?

    Please help me asap

    Regards,
    Sireesha.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,601
    Does the query use INNER JOIN? Try changing the joins to LEFT or RIGHT.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    sireesha is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    50
    Quote Originally Posted by June7 View Post
    Does the query use INNER JOIN? Try changing the joins to LEFT or RIGHT.
    Hi,

    yes, it is used inner join. but i tried for left join also but it will not work.

    please review my query

    FROM PurchasedVehicles, SoldVehicles, (PURCHASE INNER JOIN SALES ON PURCHASE.PURCHASE_ID = SALES.PURCHASE_ID) INNER JOIN REP ON (puRCHASE.ID = REP.ID) AND (REP.ID = SALES.ID)

    i will get a result of sales table result. but i need to display remaining purchased list.

    on sales before leftjoin is used. but it will get an error.

    please help me asap

    Regards,
    Sireesha.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,601
    If you want to provide db for analysis and testing, I will try. Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query for Joins
    By sireesha in forum Queries
    Replies: 4
    Last Post: 07-15-2013, 08:27 AM
  2. Replies: 2
    Last Post: 03-06-2013, 11:37 PM
  3. Replies: 5
    Last Post: 11-05-2012, 08:33 AM
  4. Replies: 15
    Last Post: 10-22-2012, 06:06 PM
  5. Replies: 4
    Last Post: 06-16-2011, 09:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums