Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Syntax for Report Crosstable Cursor?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL Syntax for Report Crosstable Cursor?
Divers
Thread ID:
00460791
Message ID:
00460791
Vues:
47
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?
Répondre
Fil
Voir

Click here to load this message in the networking platform