Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Top problem
Message
From
17/08/2000 18:07:29
 
 
To
13/06/2000 16:11:10
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Miscellaneous
Thread ID:
00379934
Message ID:
00406444
Views:
19
>>I'm using SQL Server 7.0. I restored a database from a backup, and for this database, when I try to: - select top 10 * from sysindexes. The SQL returns an error '10' is not a valid entry.
>
>Just a wild guess, cause I never really looked how SQL Server does this (VFP doesn't cause errors on these): could it be that there are more than 10 records tied for first and choosing the top 10 would cause an error? Or that less than 10 records qualify to be in the result?

Couple of things... you really only need to state "select top 10 from ..." and exclude the asterisk. However, are you doing this via SQLEXEC or are you setting up a remote view with this select statement? My experience has been that remote views don't like "SELECT TOP" and in fact if you look at the view designer while you are creating a remote view, the "top" option is not even available on the Misc tab. Does anybody know why this is? If you try to programmatically create this select via "CREATE SQL VIEW xxx REMOTE AS ..." you would get an ODBC error back "Incorrect syntax near 10". I have not reported this to Microsoft .... yet. I am using VFP SP4 and the most recent SQL server driver.
Previous
Reply
Map
View

Click here to load this message in the networking platform