Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Help Needed Please!
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00548100
Message ID:
00548235
Vues:
14
This message has been marked as the solution to the initial question of the thread.
>Did you add TO_NAME to the orders table? I tried running it using the TASTRADE tables and it gives me the error: SQL: Column 'TO_NAME' is not found.
>
>-regards
I used VFP 7 sample data. Try this
Select Division.ckey, Min(Division.div_name) As div_name ;
	From Division ;
	Group by 1 ;
	Order By 1 ;
	Into Cursor temp1 Nofilter

Select Company.ckey, Padr(Company.companynam, 30) As companynam , ;
	temp1.div_name ;
	From Company, temp1 ;
	Where Company.ckey = temp1.ckey ;
Union All ;	
Select Company.ckey, Space(30), Division.div_name ;
	From Company, Division ;
	Where Company.ckey = Division.ckey ;
		And Not Exists  ( ;
		Select * ;
			From temp1 ;
			Where temp1.ckey = Division.ckey  ;
				And temp1.div_name = Division.div_name ) ;
	Order By 1 ;			
	Into Cursor ResultCursor
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform