Error 1 Incorrect syntax near ORDER.  
Author Message
Hosam Kamel





PostPosted: Visual Studio Team System - Database Professionals, Error 1 Incorrect syntax near ORDER. Top

hi ,
i have a small problem
i'm trying to write a pagging stored procedure that use the ROW_NUMBER the sp run correctly with no problem in SQL Server Managment studio but while i'm trying to add it to the Database project in "VS 2005 for database professional"
i got this error "Error 1 Incorrect syntax near ORDER."

here is the sp:

Create PROCEDURE [dbo].[pico_GetCommentsPerPost]
-- Add the parameters for the stored procedure here



AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

-- Insert statements for procedure here

-- Set the page bounds

SELECT Id, CustomerName
FROM (SELECT ROW_NUMBER() OVER (ORDER BY Id DESC)
AS Row, Id,CustomerName FROM Customers)
AS LogWithRowNumbers

END

any help



Visual Studio Team System8  
 
 
Jon Liperi





PostPosted: Visual Studio Team System - Database Professionals, Error 1 Incorrect syntax near ORDER. Top

Hi Hosam,

Thank you for your feedback. Unfortunately, this is a bug in the parser for CTP5. An issue has been logged internally. If you find other issues, please let us know. We really value such input.

Thanks!

-Jon



 
 
The Samster





PostPosted: Visual Studio Team System - Database Professionals, Error 1 Incorrect syntax near ORDER. Top

Errr... ohhkay; so are we stuck for the time being ! Is there any kind of a workaround for this issue Thank you!

 
 
Martin Moe





PostPosted: Visual Studio Team System - Database Professionals, Error 1 Incorrect syntax near ORDER. Top

Errr... ohhkay; so are we stuck for the time being ! Is there any kind of a workaround for this issue Thank you!

Same problem here. Hope to have this in the next CTP at least.

Brumlemann
Solution Architect


 
 
Jon Liperi





PostPosted: Visual Studio Team System - Database Professionals, Error 1 Incorrect syntax near ORDER. Top

Unfortunately there is no work-around in the IDE for CTP5. However, you could comment out that line of your stored procedure to enable you to build the deployment script, and then manually edit/execute the deployment script for deployment. This issue should be fixed in the next CTP.

Thanks,
Jon