Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
bradbox
Starting Member
2 Posts |
Posted - 2008-05-05 : 16:28:40
|
| Hello,I have two tables:tasksid intuserid intotherstuff intsample rows:1,11,22,11,2timesid inttaskid intstartweek datetimestatus intsample rows:1,1,'04/28/2008',12,1,'04/28/2008',12,2,'04/28/2008',1I want to retrieve:ALL [tasks] with [times].[status] for a specific user for a given week, whether rows exist in [times] or not.Here's my query:select tasks.id, times.statusfrom tasks LEFT OUTER JOIN times ON tasks.id = times.taskid where upt.userid=11 AND times.startweek='05/05/2008'That just doesn't return any the records though for the 05/05/2008 date. Its as though I want to join with a WHERE clause on the [times] table. What can I do?Thanks in advance,Brian |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
|
bradbox
Starting Member
2 Posts |
Posted - 2008-05-05 : 17:07:26
|
| Thank you so very, vey much for saving me hours of head ache! |
 |
|
|
|
|
|
|
|