Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

TOP CLAUSE not working in queries and views
I had to convert a database from VFP into SQL 2000.  I have a primary key I
have added, plus I have properly indexed the table as well.  Unfortunately,
I cannot create a query that supports the TOP clause.  SQL Server keeps
returning "Incorrect syntax near '100'"  The user DBO has permissions to
everything.  I have created a view in another database on the same server
and it seems to respond correctly.



Report this thread to moderator Post Follow-up to this message
Old Post
John Cosmas
07-31-05 01:23 AM


Re: TOP CLAUSE not working in queries and views
SELECT
TOP 100 PERCENT
*
FROM
TableA

Regards
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mike@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

"John Cosmas" <johncosmas@charter.net> wrote in message
news:zAVGe.2526$5B2.990@fe04.lga...
>I had to convert a database from VFP into SQL 2000.  I have a primary key I
> have added, plus I have properly indexed the table as well.
> Unfortunately,
> I cannot create a query that supports the TOP clause.  SQL Server keeps
> returning "Incorrect syntax near '100'"  The user DBO has permissions to
> everything.  I have created a view in another database on the same server
> and it seems to respond correctly.
>



Report this thread to moderator Post Follow-up to this message
Old Post
Mike Epprecht \(SQL MVP\)
07-31-05 01:23 AM


Re: TOP CLAUSE not working in queries and views
Check to be sure the server is not in 6.5 compatibility mode.

--
Andrew J. Kelly  SQL MVP


"John Cosmas" <johncosmas@charter.net> wrote in message
news:zAVGe.2526$5B2.990@fe04.lga...
>I had to convert a database from VFP into SQL 2000.  I have a primary key I
> have added, plus I have properly indexed the table as well.
> Unfortunately,
> I cannot create a query that supports the TOP clause.  SQL Server keeps
> returning "Incorrect syntax near '100'"  The user DBO has permissions to
> everything.  I have created a view in another database on the same server
> and it seems to respond correctly.
>



Report this thread to moderator Post Follow-up to this message
Old Post
Andrew J. Kelly
07-31-05 08:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 12:21 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006