Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL syntax for the following
Message
 
 
To
22/12/2008 08:04:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01244721
Message ID:
01370017
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform