CapnHector (2/27/2013)
thats what i mean by sub query.However how many rows are in the logging table and what indexes there are will affect this a lot. Also is End_Time a DateTime column or Varchar? might be having an issue with your date format as well.
the End_Time is a char(14) date type
the log_login_tbl has 981.057 rows