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:
00548293
Vues:
14
>yeah, it says "DIV_NAME is not unique and must be qualified".

My colleague just came up with the simpler and nicer solution, than mine. Here it is:
select CompanyNam as Comp_Name, min(Div_Name) as Div, ;
from Company left join Division ;
on Company.CkeyID=Division.CKeyID ;
group by 1 ;
into cursor curTemp

select iif(Div_Name=Div, Comp_Name, space(30)), Div_Name ;
       from Company left join Division ;
       on Company.CkeyID=Division.CKeyID ;
       left join curTemp on CompanyName+Div_Name=Comp_Name+Div ;
       into cursor FinalResult
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform