• Not really sure how you're presenting this data to the users, but I don't know that you'd need to create a view and then query the view unless that worked out better for performance reasons using an indexed view or some other such thing...

    I'd just use a group by and a having clause inside of a stored procedure.

    note this has not been checked for syntax etc... If you want a tested solution you'd need to submit some sample data and table definitions as per the first link in my signature...

    CREATE PROCEDURE GetUserTrainingHours

    @lowRange int,

    @highRange int

    AS

    BEGIN

    SELECT LName, FName, MI, SUM(CourseHourCredit) AS Total

    From trainingrecords

    Group BY LName, FName, MI

    HAVING SUM(CourseHourCredit) between @lowrange AND @highRange

    END

    Then you just call the stored procedure passing in the values you got from the user in your front end whatever that happens to be, VB, Access, ASP whatever...

    Hope that makes sense....

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]