Results 1 to 2 of 2

Thread: Help!!

  1. #1
    Join Date
    Feb 2004
    Posts
    41

    Unanswered: Help!!

    Hey could someone help me with this please - I have to do a query where the user enters in a start date and an end date! These two dates are checked off the database and the user is returned a list of cars that are available during the specified dates. I have broken it down to two queries - 1st i find which cars are rented during the period they specify -
    I then use the same code but put <> Any before it - sometimes it works sometimes it doesnt - Can anyone help me?!
    Code im using:
    <> Any (SELECT Rental_Agreement.rental_no, Rental_Agreement.date_start, Rental_Agreement.date_return, Vehicle_Detail.vehicle_no
    FROM Vehicle_Detail INNER JOIN Rental_Agreement ON Vehicle_Detail.vehicle_no = Rental_Agreement.vehicle_no
    WHERE (((Rental_Agreement.date_start) Between [Enter Start Date] And [Enter Return Date]));

  2. #2
    Join Date
    Jan 2004
    Location
    Romania - Bucharest
    Posts
    50
    Try also:

    ... NOT IN (SELECT Rental_Agreement.rental_no, Rental_Agreement.date_start, Rental_Agreement.date_return, Vehicle_Detail.vehicle_no
    FROM Vehicle_Detail INNER JOIN Rental_Agreement ON Vehicle_Detail.vehicle_no = Rental_Agreement.vehicle_no
    WHERE (((Rental_Agreement.date_start) Between [Enter Start Date] And [Enter Return Date]));

Posting Permissions

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