February 28, 2005 at 4:09 pm
On a 2K server (sp1) I am recieving a syntax error when using the TOP clause in a select. For example, "Select TOP 100 Percent * from ANYTABLE" gives a syntax error at 100.
This happens when trying to create views in EM and T-SQL.
If you try to open the table in EM the Return Rows option is greyed out.
I know the server should be upped to the latest sp but this was not the behaviour a month ago.
Anyone seen this before ?
Cheers all,
DB
The systems fine with no users loggged in. Can we keep it that way ?br>
February 28, 2005 at 4:15 pm
Check the compatibility level of the database:
exec sp_dbcmptlevel YourDBName
It needs to return 7.0 or greater, otherwise TOP isn't available.
February 28, 2005 at 4:24 pm
Brill !
Got it in one - sp returns 65, which makes sense as it is a dinosaur database.
thanks,
DB
The systems fine with no users loggged in. Can we keep it that way ?br>
February 28, 2005 at 4:27 pm
>>it is a dinosaur database
Sqlsaurus Rex ?
March 1, 2005 at 1:50 am
Any reasons why you are still on SP1 ?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
March 1, 2005 at 2:33 pm
It's about to be vaporised, like the dinosaurs and the meteor - if you subscibe to that theory.
No other reason.
DB
The systems fine with no users loggged in. Can we keep it that way ?br>
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply