Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COMPLEX LEFT OUTER JOIN??

Status
Not open for further replies.

stuartgmilton

Programmer
Nov 12, 2001
66
GB
Hey Guys,

I have 2 tables which I want to group on Date and ResourceDisciplineID.

I have gotten this far but get stuck adding the 2nd join? Anyone able to help?

select TFU.*,
SI.*
from #TimeFrameUnion TFU
LEFT JOIN
#ScheduledInfo SI on
TFU.resourcedisciplineid = SI.resourcedisciplineid
 
sorry i dont get your doubt. why do you want to group by (you dont use any aggregate functions)? do you mean order by???

select TFU.*,
SI.*
from #TimeFrameUnion TFU
LEFT JOIN
#ScheduledInfo SI on
TFU.resourcedisciplineid = SI.resourcedisciplineid
Order by ColumnNames

Known is handfull, Unknown is worldfull
 
[tt][blue]
select TFU.*,
SI.*
from #TimeFrameUnion TFU
LEFT JOIN
#ScheduledInfo SI on
TFU.resourcedisciplineid = SI.resourcedisciplineid
[!]and TFU.DateColumn = SI.DateColumn[/!]
[/blue][/tt]

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Oh My God!! I'm so thick!

Thanks George.

Why is it that you stare at something for ages and can't see the obvious!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top