Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 18th, 2005, 05:01 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default Stored Procedure

Hello,

   I have a table in the structure

indexno identity
cardno varchar
trdate datetime
trtime datetime

I am getting the data from the scanner(Attendance scanner) using some frontend(ASP)

I want to calculate number of hours worked in tat month.
For this i want to write a S.P. But i am not sure how many records for each card on each day. Generally 4(morning IN, morning OUT, lunch IN, evening OUT)
sometimes will have OT(After 6:00 PM)

How can i get the totalRegularHours and totalOTHours in tat month with this table structure.

I need to calculate for each date. Suppose one day one EMP worked in OT and all other days normal hours. I want to get regular and OT hours. I dont have IN/OUT data. I have only scanned time and date for each card. So tat how can i find hours worked. As i have un equal records for each day. I think u got it.

Pls give me reply.

Thanks in advance.









Similar Threads
Thread Thread Starter Forum Replies Last Post
stored procedure prashant_telkar SQL Server 2000 1 July 9th, 2007 07:57 AM
Stored Procedure jezywrap SQL Server ASP 1 January 3rd, 2007 12:29 AM
stored procedure kdm260 SQL Server 2000 2 June 19th, 2006 04:45 PM
Help About Stored Procedure zhuge6 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 May 20th, 2005 09:27 AM
Stored Procedure help flyin SQL Server 2000 4 August 3rd, 2004 07:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.