Board index » delphi » SQL server 2000 SQL problem - TOP doesn't work

SQL server 2000 SQL problem - TOP doesn't work

Apologies if this is not the correct forum, but I recently
upgraded SQL 6.5 to SQL 2000.  We had some problems with
msdb which I managed to fixed but has anyone met this one:

One of the reasons for upgrading was to get access to the
extra SQL syntax, especially the TOP statement eg: "Select
TOP 5 * from tablex"

When I try to use this, either on the SQL Query Analyser or
in Delphi I get "syntax error '5' not recognised".  Is this
a consequence of upgrading, and is SQL 2000 still in SQL 6.5
mode?  Is there a way to enable this, or am I going to have
to reinstall SQL 2000?  I don't have this problem on a
"clean" SQL 2000 install.

Any help would be much appreciated...

TIA

Barry

--
Dr Barry Clark
Senior Lecturer
Medical Education Unit
11 Southpark Terrace
University of Glasgow
Glasgow G12 8LG
Tel: 0141--330-4248
Email:  b.cl...@clinmed.gla.ac.uk

 

Re:SQL server 2000 SQL problem - TOP doesn't work


"Barry Clark" <b.cl...@clinmed.gla.ac.uk> schrieb im Newsbeitrag
news:3d620bd9$1@newsgroups.borland.com...

Quote
> Apologies if this is not the correct forum, but I recently
> upgraded SQL 6.5 to SQL 2000.

news:microsoft.public.sqlserver.server would be a good starting
point.

Quote
> We had some problems with
> msdb which I managed to fixed but has anyone met this one:

> One of the reasons for upgrading was to get access to the
> extra SQL syntax, especially the TOP statement eg: "Select
> TOP 5 * from tablex"

> When I try to use this, either on the SQL Query Analyser or
> in Delphi I get "syntax error '5' not recognised".  Is this
> a consequence of upgrading, and is SQL 2000 still in SQL 6.5
> mode?  Is there a way to enable this, or am I going to have
> to reinstall SQL 2000?  I don't have this problem on a
> "clean" SQL 2000 install.

Probably your database is in the SQL-Server 6.5 compatibillity level.
Start the enterprise manager, select your database, select "properties"
in the context menu, select the page "options" an set the level
to 80.

greetings
Andreas Schmidt

Other Threads