Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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 ')'.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!