DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Query Help

  1. #1
    Join Date
    Dec 2008
    Posts
    0

    Question Query Help



    I have a library database where users can borrow media from my inventory list. I am trying to query the database to find out the last user to borrow certain media. Rather than get the last user(s) to borrow the media I get a list of all the users to make a borrow transaction. I believe I am just leaving out something very simple. Please help.

    This is my query:
    SELECT Users.LastName,Users.UserID,InvTransactions.TransDate FROM InventoryData,InvTransactions,TransToUser,Users WHERE Users.UserID=TransToUser.UserID AND TransToUser.TransactID=InvTransactions.TransactID AND InventoryData.InventoryID=24

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    better ask you teacher for help

  3. #3
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Talking The end (date) is near...

    HINT:

    Try adding a condition to select the MAX(InvTransactions.TransDate) for that media.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

Posting Permissions

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


Click Here to Expand Forum to Full Width