Why the error in syntax (SQL server 2008 R2)

0

the following query:

DECLARE @ntp int,
@jugador varchar (max)= 'Hola',
@Player varchar (max)

SET @Jugador = @Player



EXEC    @ntp = [PS_GameDefs].[dbo].[Command]
        @serviceName = N'ps_game',
        @cmmd = N'/ntplayer '+@Player+' '+ ' '+'Has ganado'

SELECT  'Return Value' = @ntp

GO

I get the error:

Msg 102, Level 15, State 1, Line 12
Incorrect syntax near '+'.

you can see that it is the "+" symbol that I think the query is fine but I can not explain why the error?

    
asked by Juan Carlos Villamizar Alvarez 07.08.2018 в 05:02
source

0 answers