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:
00552614
Vues:
25
>>>Perhaps ":)" was a little bit misleading, so I took it as a mockery. Well, let's think about it as a huge misunderstanding.
>
>If that's an apology then it's a pretty sad one.
>
>>> You have an ability to mark post as a help (one star).
>
>Thanks I will do that.
>
>>> Just try my solution again.
>
>I TRIED your solutions 4 or 5 times. I'm done.

Ok, I've run this test program just now:
local i,k
create table Companies (CompanyNam C(30), cKey N(7))
create table Division (Div_Name C(50), cKey N(7))
for i=1 to 20
  CompanyNam="Company"+transform(i)
  cKey=i  
  insert into Companies from memvar
  for k=1 to 5
      Div_Name="Division"+transform(k)
      insert into Division from memvar
  next  
next
select min(Div_Name) as Div, cKey from Division group by 2 into cursor curTemp

select iif(Div_Name=Div, CompanyNam, space(30)) as CompanyNam, Div_Name ;
       from Division ;
       left join Companies on Division.Ckey=Companies.CKey ;
       left join curTemp on Division.cKey=curTemp.cKey and Division.Div_Name=curTemp.Div ;
       into cursor FinalResult
And it works just fine. This is what I was trying to show you all these days.
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