query

  • I have time fields like Overtime,WorekdTime,VacationTime,DoubleTime and a date field.

    How can i sort them so that I have to aggregate all the hours and count the no of hours worked according to the date.

  • You would need to provide some more details, like examples of what's needed and also make an attempt to do this in a query.

    It sounds like a test question or homework and we prefer you try to do it and we can help you understand what is working or isn't working.

  • Mike,

    Here's a good link that'll help you get better help with your questions.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Actually I need A query where i get

    No of hours of each employee by the day and by the type of hours.

  • Actually, we still need a Create Table statement, and some data. Otherwise, we're just guessing as to what your data actually looks like.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Mike,

    Read the link. It is an article on how to post a good forum thread so that we are able to help you more effectively. If you follow the suggetions in the link, helping you will be a cinch. Otherwise, we are left to guessing at what you want like Jeff has pointed out.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • I guess we are expected to be mind readers here. Of course, if we were, we'd all be VERY SUCCESSFUL CONTRACTORS commanding TOP DOLLAR! :hehe:

    Not here, unfortunately...

    😎

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply