I don't see much of a difference between these two code versions (except for [] (SQL Server specific syntax) and don't see the reference to Cetin here.
>Naomi,
>
>Sorry but this syntax:
>
>
>
>select [id],[name]
>
>from test as A1
>
>where (select count(*) from test as A2 where A2.[id]=A1.[id] and A2.name<=A1.name )<=2
>
>order by [id]
>
>
>
>will not work in VFP.
>
>you should change the code to:
>
>
>SELECT id,name ;
>from test as A1 ;
>where 2> = (select count(*) from test as As where A2.id=A1.id and A2.name<=A1.name) ;
>order by id
>
>
>with full credits for this solution to Cetin.
>
>Regards,
>
>Koen
>
>regards,
>
>Koen
If it's not broken, fix it until it is.
My Blog