Search results

  1. B

    COUNT And IFF Statement

    New SQL OK Thank you. But what will the New SQL be, because when I do: SELECT Count(tblBookings.BookingID), tblSessions.SessionID FROM (tblVenues INNER JOIN tblSessions ON tblVenues.VenueID = tblSessions.VenueID) INNER JOIN tblBookings ON tblSessions.SessionID = tblBookings.SessionID...
  2. B

    COUNT And IFF Statement

    I have the following query, and am counting the total number of bookings and need to check against the capacity to ensure that I do not overbook. On any session(tblSessions table) the total number of bookings should be <= to the capacity(tblVenues table). Now the query below shows the total...
  3. B

    Check to see if 72 hours

    I have an access table, and there is a field called user_time. Once a user record has been inserted, it puts a timestamp on this field, to record the date/time the record was saved to the database. Now I need to write a query to check if it has been 72 hours since the insertion of the user into...
  4. B

    WHERE CLAUSE in SELECT

    TB was the only parameter, being requested. How would I link the fields in the tables together, using a Having clause, instead of WHERE, i.e. c.CourseID = s.CourseID AND s.SessionID = 85 AND q.SessionID = s.SessionID AND b.SessionID = s.SessionID AND v.VenueID = s.VenueID From what you say...
  5. B

    WHERE CLAUSE in SELECT

    I tried that before, before does not work, says cannot have aggregate function in where clause.
  6. B

    WHERE CLAUSE in SELECT

    Thank you very much for you reply. I did what you told me, but it still request for a parameter. Here is the new SQL, please can you take it, modify it then post the correct SQL. SELECT CourseName, Format([s.SessionDate]+[s.StartTime],"dd/mmm/yyyy hh:ss AM/PM") & " - " &...
  7. B

    WHERE CLAUSE in SELECT

    Hi Everyone, I have the following SQL statement. The COUNT(b.BookingID) AS TB, gives me the number of bookings. I need to ensure that the number of bookings + PrebookCapacity is less than v.Capacity. I do this by: COUNT(b.BookingID) AS TB + PrebookCapacity < v.Capacity in the WHERE CLAUSE. But...
  8. B

    Executing query

    Hi there, I am trying to run a query from an ASP page, which also uses other queries. I get the following error message: [Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that does not include the specified expression 'Expr1' as part of an aggregate function, this is in...
Back
Top Bottom