Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 18th, 2005, 05:01 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
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.




Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:17 AM.


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