TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft SQL Server

Notices

Reply
 
Thread Tools Display Modes
Old 11-12-2007, 07:30 PM   #1
Paulo
Guest
 
Posts: n/a
Employes Exams?

Hi, can you help me with some SQL logic, a chemistry company must realize
some employees exams, there are 4 exams types:

1) when employe is hired
2) when employe is fired
3) when employe had the first contact with some component
4) and periodic exams, every 3 months, 6 months, etc

and I need to build a sql that fills the employe_exam_schedule based on exam
type:
the user chooses the year, example 2007 and the schedule table must be
filled with all 2007 exams records that the employees should realize.
initially all status will be 0, and another step a user system will fill the
status for each employee on a asp web-system if employee made or not the
exam...

employe_exam_schedule table:
ID_SEQ -> autonumber
ID_Employe -> number
CodExam -> number
DateShouldRealizeExame -> DateTime
Status -> bit ( 0 -> exam not realized / 1 -> exam realized)

EXAM table:

CodExam -> number
ExamName -> char
IS_PERIODIC -> bit (yes/no)
MonthPeriodicity -> SmallInt -> example every 3 months, etc...
IS_First_CONTACT -> bit(yes/no)
IS_Hired -> bit(yes/no)
IS_Fired -> bit(yes/no)

What you suggest?

Thanks!


  Reply With Quote
Reply

Thread Tools
Display Modes


Google
 


All times are GMT +5.5. The time now is 03:27 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional