Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I do this SQL Select in 1 step?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00669031
Message ID:
00669149
Views:
17
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform