Hi all...
I need a logic in SQL Server database end -
I have 4 master tables -
1. EmployeeMaster
1 - Abhineet
2 - Neha
3 - Jaya
etc - 55 employees (1,2,3 - auto increment primary key)
--------
2. SubjectMaster
1 - Java
2 - Project Management
3 - Time Management
4 - Oracle
etc - 100 subjects(1,2,3,4 - auto increment primary key)
-------------
3. OtherSubjectMasters
1- AJAX
2 -Query String
etc - 90 records (1,2,3... auto increment primary key)
-----------
4. Ouarters -
Q1(April2016-June-2016)
Q2(July2016-September2016)
Q3(October2016-December2016)
Q4(January2017-March2017)
-----------
Now, from front - end, the dropdownlist is binded with SubjectMaster.
Incase, the user wants to insert other subject (not present in SubjectMaster table, then he/she inserts othersubject in OtherSubjectMaster table)
---------
Transaction table -
| ID | EmpID | SubjectID | OtherSubjectID | Quarter |
| 1 | 1 (Abhineet) | 1 | 0 | Q3(October2016-December2016) |
| 2 | 1 (Abhineet) | 0 | 2 | Q4(January2017-March2017) |
Here, if user enters subject from dropdownlist(subjectmaster table), then "SubjectID" field will have the ID of Subject and OtherSubjectID will have 0.
----
Logic that I need -
I want to check that one employee - is allowed to attend one training in one quarter.
Eg - here now, Abhineet will not be able to attend the training of subject id - 1 in Quarter-3 (Q3).
He may attend training of other subjects in this same quarter - Q3.
How do we get uniqueness between - Employee , Subject and Quarter ??
Please guide....
Riddhi ValechaPosted Feb 17, 2016, 8:57 AM
Shubham KumarPosted Feb 17, 2016, 2:25 AM
Riddhi ValechaPosted Feb 17, 2016, 1:28 AM
Jithil JohnPosted Feb 16, 2016, 6:49 AM
Riddhi ValechaPosted Feb 16, 2016, 6:35 AM
Jithil JohnPosted Feb 16, 2016, 6:15 AM
Riddhi ValechaPosted Feb 16, 2016, 5:40 AM
Riddhi ValechaPosted Feb 12, 2016, 2:14 AM
Shubham KumarPosted Feb 12, 2016, 1:29 AM
Jithil JohnPosted Feb 12, 2016, 1:24 AM
Riddhi ValechaPosted Feb 12, 2016, 1:03 AM
How do I check that from font-end ?
Also, if this is set in back-end, then lines of code will be less...
Can you please guide to do a check from back-end ?
Jithil JohnPosted Feb 12, 2016, 12:36 AM