SQL Server Performance

punching card more than twice in a day

Discussion in 'ALL SQL SERVER QUESTIONS' started by waqar100, Dec 15, 2011.

  1. waqar100 New Member

    I need a query ,I am making Human resource management software ....
    in the scenario a employee come in office & punch card & go home at the night & punch card but during the time he went for the break for some time after punch card & come again then punch card.

    In simplicity he come office two times & go from office two time ,,I need the total workking times


    the coloum for punch card is date time
    actual_card_in_ time actual_card_out_time
  2. FrankKalis Moderator

    Welcome to the forum!
    Can you please post your table structures, some sample data and the expected result? That way it would be much easier to suggest something useful.
  3. satya Moderator

    Can you not choose the specific time as OPENING hours and if the punched card time falls in between that time.. then its considered as break time. Nevertheless follow what Frank referrd above.

Share This Page