Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sybase Error Msg

 
ghazanfar khan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Can anyone please help me out below is the stored procedure and error.

============================================
Create Procedure spGetMaximumVersionForid
@id int
As

Select id,Version = IsNull(Max(Ver),0)
From
(
Select id,Ver = Max(Version)
From ModifiedForm
Group By id
Union
Select id,Ver = Max(Version)
From ReqForm
Group By id
) As DT
Where id= @id
Group By id

GO
=================================

Server Message: Number 156, Severity 15
Incorrect syntax near the keyword 'Select'.
Server Message: Number 102, Severity 15
Incorrect syntax near ')'.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic