Problema actualizando puntos en tabla Chararter MSSQL

  • Autor Autor Drakezael
  • Fecha de inicio Fecha de inicio
D

Drakezael

Gamma
Les explico quiero adicionar cierta cantidad de puntos en en la tabla chararter, en una fila llamada SFCRuud, pero me dice que el objeto chararter no es valido (ve tu a saber) , ejemplo si redirecciono el update a memb_info y agrego WCoint o cualquier cosa dentro de memb_info si funciona todo con normalidad, entonces no se porque con chararter me da problemas.


USE [MuOnline]GO
/****** Object: StoredProcedure [dbo].[TT_IGScore] Script Date: 12/24/2016 06:21:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[TT_IGScore]
@ServerCode INT,
@AccountID VARCHAR(10),
@Name VARCHAR(10),
@PlayDay TINYINT
As
Begin
BEGIN TRANSACTION
SET NOCOUNT ON
UPDATE Chararter SET SCFRuud=SCFRuud+99 Where name = @name
IF EXISTS (SELECT NULL FROM IMPERIALGUARDIAN_INFO WHERE Account = @AccountID AND Name = @Name AND ServerCode = @ServerCode AND PlayDay = @PlayDay)
UPDATE IMPERIALGUARDIAN_INFO SET WinCount = WinCount+1 WHERE Account = @AccountID AND Name = @Name AND ServerCode = @ServerCode AND PlayDay = @PlayDay
ELSE
INSERT INTO IMPERIALGUARDIAN_INFO (ServerCode, Account, Name, WinCount, PlayDay) VALUES (@ServerCode,@AccountID,@Name,1,@PlayDay)
UPDATE Chararter SET SCFRuud=SCFRuud+99 Where name = @name
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION


SET NOCOUNT OFF
End


Devuelve:

Return

Mens 208, Nivel 16, Estado 1, Procedimiento TT_IGScore, Línea 10El nombre de objeto 'Chararter' no es válido.
Mens 266, Nivel 16, Estado 2, Procedimiento TT_IGScore, Línea 10
El recuento de transacciones después de EXECUTE indica un número no coincidente de instrucciones BEGIN y COMMIT. Recuento anterior = 3, recuento actual = 4.
 
Hola
¿Estas seguro que tu tabla no es dbo.character?
Has un select top 100 de esa tabla y ve su estado durante la ejecución del store procedure.
Tal vez este en uso y se bloquea.


Sent from my SM-G930F using Tapatalk
 
Hola
¿Estas seguro que tu tabla no es dbo.character?
Has un select top 100 de esa tabla y ve su estado durante la ejecución del store procedure.
Tal vez este en uso y se bloquea.


Sent from my SM-G930F using Tapatalk

si tampoco me deja ejecutar el select, es decir es como tu dices la bloquea, alguna solucion?
 
Ejecuta un sp_who2
Ahora debes identificar que consulta y q session está bloqueando la tabla, y tratar de optimizar. Saludos

Sent from my SM-G930F using Tapatalk
 
Ejecuta un sp_who2
Ahora debes identificar que consulta y q session está bloqueando la tabla, y tratar de optimizar. Saludos

Sent from my SM-G930F using Tapatalk

bueno aprendio algo nuevo, con eso del sp_who2, el error era que ponia mal el nombre de la tabla, bastante tonto e.e yo usaba "Chararter" y era " Character" y bueno gracias igual un gran abrazo
 
Atrás
Arriba