Click here to Skip to main content
15,893,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi guys,

I have three table in sql server,
[job, emp & emp_history]

once the job is created the user can assign employees to the job
n
before the job is closed the user can assign more employees or can remove assigned employees.

here the problem is, how to maintain Starting date n Ending date of an employee,
in both of these tables[emp n emp_history] i have these two columns (starting date n ending date)
because, i have to display it in one repeater by merging both the tables[emp n emp_history].

the repeater look like this,
--------------------------------------------------------------
jobID | Emp-ID | Emp-Name      | Starting Date | Ending Date |
--------------------------------------------------------------
1     |  01    | ABC           | 08/01/2014    | 08/30/2014  |
--------------------------------------------------------------
2     |  02    | DEF           | 08/01/2014    | 08/15/2014 *|
--------------------------------------------------------------
3     |  03    | GHI           | 08/16/2014 *  | 08/30/2014  |
--------------------------------------------------------------


can anyone plz help me,

Thanks
Posted

you fetch your data by database query in your required format ,
after that you can easily do this
 
Share this answer
 
Hello
Both table have starting date and ending date field then you have to decide which table's field do you want to display .
eg .
if you want to display starting date of " emp " table , then just write emp.startindate.

When you are using more than 1 tables in your query , and some fields' names are common then you need to write TABLEANME.TABLEFIELD and you ll get your result.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900