Looking for some SQL help. I have tables and SQL like the below. What I want is a single (report-ready) cursor that looks like this:
cManager cEmpl
-----------------------
Steve Paul
Steve Brad
Steve Tom
Fran Paul
Fran Brad
Fran Tom
Fran Steve
And my current tables look like this:
timeuser:
cAssocID cEmpl cMgr1 cMgr2
---------------------------------
1 Paul Steve Fran
2 Brad Steve
3 Tom Steve
reportnames:
cAssocID cEmpl
-----------------
1 Paul
2 Brad
3 Tom
My SQL currently looks like this:
select ;
timeuser.cMgr as cManager , ;
reportnames.cAssocID as cAssocID , ;
reportnames.cEmpl as cEmpl ;
;
from timeuser ;
left join reportnames on ;
reportnames.assoc_id = timeuser.usermgr ;
or reportnames.assoc_id = timeuser.usermgr2 ;
;
order by cManager , cAssocID ;
nowait
This is VFP6/SP4. I need help?