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:
00669093
Views:
15
Hi, Sergey!

I tried your idea
This query should work 
SELECT * FROM t1 ;
	WHERE STR(EmpId) + Dtos(EffectiveDate) IN ( ;
		Select Str(EmpID) + Dtos(max(EffectiveDate)) ;
  from t1 ;
  where EffectiveDate <= ?dParam ;
  group by EmpID )
...but it gives the following result...
EmpID     EffectiveDate      Value
1         {3/4/2}            18
...instead of th wished result:
EmpID     EffectiveDate      Value
1         {3/4/2}            18
2         {4/5/2}            18
3         {1/1/1}             7
What I'm missing?
SeBaFlu
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform