Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query question

Author  Topic 

ic3man
Starting Member

6 Posts

Posted - 2012-05-24 : 09:07:48
[code]CREATE PROCEDURE proc1 AS
SELECT CONVERT(NVARCHAR, LEFT(Knjiga.DatumIzdanja,4)+'/'+Knjiga.ISBN AS [ISBN po godinama]
FROM Knjiga
ORDER BY Knjiga.DatumIzdanja DESC
GO[/code]


Msg 156, Level 15, State 1, Procedure Prefiks3, Line 2
Incorrect syntax near the keyword 'AS'.
Whats the issue? :/

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-05-24 : 09:10:30
You were missing a parenthesis:
CREATE PROCEDURE proc1 AS
SELECT CONVERT(NVARCHAR, LEFT(Knjiga.DatumIzdanja,4)+'/'+Knjiga.ISBN) AS [ISBN po godinama]
FROM Knjiga
ORDER BY Knjiga.DatumIzdanja DESC
GO
Go to Top of Page

ic3man
Starting Member

6 Posts

Posted - 2012-05-24 : 09:17:54
Yep , i missed that.. :) im losing my edge ;D thanks
Go to Top of Page
   

- Advertisement -