Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I do this SQL Select in 1 step?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00669031
Message ID:
00669149
Vues:
16
Hi Sebastian,
My subquery includes 'GROUP BY EmpID' that generates one record per EmpId.
Select Str(EmpID) + Dtos(max(EffectiveDate)) ;
  from t1 ;
  where EffectiveDate <= ?dParam ;
  group by EmpID
>Hi, Sergey!
>
>>>
>I tested it before posting and once again this morning and it returned correct result. I think you should check your data and dParam value.
><<
>
>Ok - I believe it <s>! May be there is some problem in my testdata - but I'm confused about the following: In all my tested circumstances the subselect
>
>Select Str(EmpID) + Dtos(max(EffectiveDate)
>
>returns only one record (IMO caused by the MAX() function).
>
>Can you explain to me why this can work correctly (independent from possible errors during my tests <s>) - to make the whole SQL to give 3 records back IMO it's neccesary to get 3 records from the subselect.
>
>TIA!
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform