• SELECT EmployeeNumber, Date, Min(time) as Login, MAX( Time) AS Logout

    From Table

    Group By EmployeeNumber, Date

    If you'd like better tested code, check out the first link in my signature as to how to lay the problem out for us to provide you with working examples.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA