MSSQL int to string

Problem: pretvoriti int u string unutar stored procedure

 

Rješenje:

 


DECLARE @broj_narudzbe nvarchar(50)
 DECLARE @Godina int
 DECLARE @broj int

SELECT @broj_narudzbe = CAST(@broj as varchar(10))+'-'+CAST(@Godina as varchar(10))

Leave a Reply

You must be logged in to post a comment.