• ~Larry Briscoe (5/21/2009)


    All queries failed due to missing Owner/Schema.

    The queries that were supposed to run worked fine for me.

    I think a potential issue in the question that could get tricky for some people is the SUM(VacationHours) in Query 1. The column VacationHours is defined as smallint. If someone is working on a modified their AdventureWorks database then the HumanResources.Employee table might have a substantial number of records added to it, or updates to the VacationHours column, such that summing VacationHours gives an overflow error.