• You're welcome!

    Btw, note that for "SELECT TOP (1) *", the * is not a problem, because SQL can determine that it needs to get only the columns that are actually referenced in the outer query. You can verify that by looking at the OUTPUT section for that table in the query plan -- it should include only the column actually referenced by f_min and f_max aliases, not all the columns in the f table.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.