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:
00669139
Views:
14
Hi Sebastian,

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.

>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?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform