find least of date among many tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

dear friends.
i have 7 tables and all the tables contains date field
now how to find out the least of date among all the tables and
how to find out the lastvalue (very recent value)of date among all the
fielkds
and finally i should have only such 2 values only in the query.
 
You first need to find the first date in each table. Do that by using Min()
in an aggregate query, or by sorting and using the TOP predicate. Next
either use a Union query, or output the results into a temporary table.
 
Back
Top