SP_POINT_ACCUMULATION [0.97D+0.99B]

Bienvenidos a un nuevo tutorial, el siguiente procedimiento corresponde a la versiĆ³n 0.97D+0.99B del MuOnline y se titula SP_POINT_ACCUMULATION

Procedimiento sql

--www.muonlinetutoriales.com
--by asd*

CREATE PROCEDURE SP_POINT_ACCUMULATION
@Server tinyint,
@Square tinyint,

@AccountID varchar(10),
@CharacterName varchar(10),
@Class tinyint ,
@Point int
As
Begin

BEGIN TRANSACTION

SET NOCOUNT ON

IF EXISTS ( SELECT CharacterName FROM EVENT_INFO WITH (READUNCOMMITTED)
WHERE Server = @Server AND AccountID = @AccountID AND CharacterName = @CharacterName )
Begin
UPDATE EVENT_INFO
SET Point = Point + @Point , Square = @Square
WHERE Server = @Server AND AccountID = @AccountID AND CharacterName = @CharacterName
End
ELSE
Begin
INSERT INTO EVENT_INFO ( Server, Square, AccountID, CharacterName, Class, Point ) VALUES (
@Server,
@Square,
@AccountID,
@CharacterName,
@Class,
@Point
)
End


IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION

SET NOCOUNT OFF
End


GO

¿Necesitas ayuda? Visita www.iceventas.com y nosotros lo hacemos por ti.

Se han publicado un total de 0 comentarios en Mu Online Tutoriales :

Publicar un comentario