Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Syntax for Report Crosstable Cursor?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Syntax for Report Crosstable Cursor?
Miscellaneous
Thread ID:
00460791
Message ID:
00460791
Views:
46
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?
Reply
Map
View

Click here to load this message in the networking platform