I have two tabels, "Employees" 1 hold names & employee etc.
2nd "Submitted" holds whether they submitted a time sheet that week. The Submitted table has the WeekEnd Date of when they submit
such as
Fred Smith 7/28/2012
Cary Grant 7/28/2012
I would like to see all names frmm the Employees table regardless fi submittted has a record but also if they submitted a time sheet have it show an '*' next to their name, like so
* Fred Smith
Sally Jones
Sue Cope
* Cary Grant
etc
I created a temp table which I add records to with tow diifern selects, but is there a way to have a join statement. I am showing the names in a drop down list in an ASPX page. So some one could quickly see if a person did not submit yet?
This is what I have so far...
DougP
2nd "Submitted" holds whether they submitted a time sheet that week. The Submitted table has the WeekEnd Date of when they submit
such as
Fred Smith 7/28/2012
Cary Grant 7/28/2012
I would like to see all names frmm the Employees table regardless fi submittted has a record but also if they submitted a time sheet have it show an '*' next to their name, like so
* Fred Smith
Sally Jones
Sue Cope
* Cary Grant
etc
I created a temp table which I add records to with tow diifern selects, but is there a way to have a join statement. I am showing the names in a drop down list in an ASPX page. So some one could quickly see if a person did not submit yet?
This is what I have so far...
Code:
Select '* ' + Lastname + ', ' + Firstname from Submitted sd
JOIN Employees sw on sw.LastName = sd.LastName
Where sd.Weekenddate = '2012-07-28'
and sd.ManagerName = 'Fred Flinstone'
DougP