Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Procedure ACHIEVEMENTS para s6  (Visto 724 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline lautha Posteado: February 09, 2024, 05:15:28 AM | Modificado: February 09, 2024, 11:47:25 AM by ZabiinoOo

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 1.544
  • Gracias recibida: 30
  • ar
Hola amigos, estoy en busca del Procedure de ARCHIEVEMENST para S6.
busco solo el o los procedures de  'ACHIEVEMENTS_LOAD' y  procedure 'ACHIEVEMENTS_SAVE'.
Si alguno seria tan amable de darme una mano estaria agradecido.


Técnico Informático Programador PHP SQL HTML CSS C++

Gracias:


Offline webmonkey #1 Posteado: February 13, 2024, 07:23:50 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 45
  • Gracias recibida: 48
  • ar
Code: [Select]


CREATE PROCEDURE [dbo].[ACHIEVEMENTS_LOAD]
@szName VARCHAR(10)
AS
BEGIN
BEGIN TRANSACTION

SET NOCOUNT ON
IF EXISTS ( SELECT Name FROM Achievements  WITH ( READUNCOMMITTED )
WHERE Name = @szName )
BEGIN
SELECT
count_1,
count_2,
count_3,
count_4,
count_5,
count_6,
count_7,
count_8,
count_9,
count_10,
count_11,
count_12,
count_13,
count_14,
count_15,
count_16,
count_17,
count_18,
count_19,
count_20,
count_21,
count_22,
count_23,
count_24,
count_25,
count_26,
count_27,
count_28,
count_29,
count_30,
count_31,
count_32,
count_33,
count_34,
count_35,
count_36,
count_37,
count_38,
count_39,
count_40,
count_41,
count_42,
count_43,
count_44,
count_45,
count_46,
count_47,
count_48,
count_49,
count_50
FROM Achievements WHERE Name = @szName
END
ELSE
BEGIN
INSERT INTO Achievements (
Name,
count_1,
count_2,
count_3,
count_4,
count_5,
count_6,
count_7,
count_8,
count_9,
count_10,
count_11,
count_12,
count_13,
count_14,
count_15,
count_16,
count_17,
count_18,
count_19,
count_20,
count_21,
count_22,
count_23,
count_24,
count_25,
count_26,
count_27,
count_28,
count_29,
count_30,
count_31,
count_32,
count_33,
count_34,
count_35,
count_36,
count_37,
count_38,
count_39,
count_40,
count_41,
count_42,
count_43,
count_44,
count_45,
count_46,
count_47,
count_48,
count_49,
count_50 )
VALUES ( @szName,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0 )

SELECT
count_1,
count_2,
count_3,
count_4,
count_5,
count_6,
count_7,
count_8,
count_9,
count_10,
count_11,
count_12,
count_13,
count_14,
count_15,
count_16,
count_17,
count_18,
count_19,
count_20,
count_21,
count_22,
count_23,
count_24,
count_25,
count_26,
count_27,
count_28,
count_29,
count_30,
count_31,
count_32,
count_33,
count_34,
count_35,
count_36,
count_37,
count_38,
count_39,
count_40,
count_41,
count_42,
count_43,
count_44,
count_45,
count_46,
count_47,
count_48,
count_49,
count_50
FROM Achievements WHERE Name = @szName
END

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

END




go



CREATE PROCEDURE [dbo].[ACHIEVEMENTS_SAVE]
@szName varchar(10),
@count_1 int,
@count_2 int,
@count_3 int,
@count_4 int,
@count_5 int,
@count_6 int,
@count_7 int,
@count_8 int,
@count_9 int,
@count_10 int,
@count_11 int,
@count_12 int,
@count_13 int,
@count_14 int,
@count_15 int,
@count_16 int,
@count_17 int,
@count_18 int,
@count_19 int,
@count_20 int,
@count_21 int,
@count_22 int,
@count_23 int,
@count_24 int,
@count_25 int,
@count_26 int,
@count_27 int,
@count_28 int,
@count_29 int,
@count_30 int,
@count_31 int,
@count_32 int,
@count_33 int,
@count_34 int,
@count_35 int,
@count_36 int,
@count_37 int,
@count_38 int,
@count_39 int,
@count_40 int,
@count_41 int,
@count_42 int,
@count_43 int,
@count_44 int,
@count_45 int,
@count_46 int,
@count_47 int,
@count_48 int,
@count_49 int,
@count_50 int
AS

SET NOCOUNT ON

UPDATE Achievements SET
count_1 =  @count_1 ,
count_2 =  @count_2 ,
count_3 =  @count_3 ,
count_4 =  @count_4 ,
count_5 =  @count_5 ,
count_6 =  @count_6 ,
count_7 =  @count_7 ,
count_8 =  @count_8 ,
count_9 =  @count_9 ,
count_10 = @count_10,
count_11 = @count_11,
count_12 = @count_12,
count_13 = @count_13,
count_14 = @count_14,
count_15 = @count_15,
count_16 = @count_16,
count_17 = @count_17,
count_18 = @count_18,
count_19 = @count_19,
count_20 = @count_20,
count_21 = @count_21,
count_22 = @count_22,
count_23 = @count_23,
count_24 = @count_24,
count_25 = @count_25,
count_26 = @count_26,
count_27 = @count_27,
count_28 = @count_28,
count_29 = @count_29,
count_30 = @count_30,
count_31 = @count_31,
count_32 = @count_32,
count_33 = @count_33,
count_34 = @count_34,
count_35 = @count_35,
count_36 = @count_36,
count_37 = @count_37,
count_38 = @count_38,
count_39 = @count_39,
count_40 = @count_40,
count_41 = @count_41,
count_42 = @count_42,
count_43 = @count_43,
count_44 = @count_44,
count_45 = @count_45,
count_46 = @count_46,
count_47 = @count_47,
count_48 = @count_48,
count_49 = @count_49,
count_50 = @count_50
WHERE Name = @szName;

SET NOCOUNT OFF



go

Gracias:


Offline lautha #2 Posteado: February 19, 2024, 08:07:19 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 1.544
  • Gracias recibida: 30
  • ar
Code: [Select]


CREATE PROCEDURE [dbo].[ACHIEVEMENTS_LOAD]
@szName VARCHAR(10)
AS
BEGIN
BEGIN TRANSACTION

SET NOCOUNT ON
IF EXISTS ( SELECT Name FROM Achievements  WITH ( READUNCOMMITTED )
WHERE Name = @szName )
BEGIN
SELECT
count_1,
count_2,
count_3,
count_4,
count_5,
count_6,
count_7,
count_8,
count_9,
count_10,
count_11,
count_12,
count_13,
count_14,
count_15,
count_16,
count_17,
count_18,
count_19,
count_20,
count_21,
count_22,
count_23,
count_24,
count_25,
count_26,
count_27,
count_28,
count_29,
count_30,
count_31,
count_32,
count_33,
count_34,
count_35,
count_36,
count_37,
count_38,
count_39,
count_40,
count_41,
count_42,
count_43,
count_44,
count_45,
count_46,
count_47,
count_48,
count_49,
count_50
FROM Achievements WHERE Name = @szName
END
ELSE
BEGIN
INSERT INTO Achievements (
Name,
count_1,
count_2,
count_3,
count_4,
count_5,
count_6,
count_7,
count_8,
count_9,
count_10,
count_11,
count_12,
count_13,
count_14,
count_15,
count_16,
count_17,
count_18,
count_19,
count_20,
count_21,
count_22,
count_23,
count_24,
count_25,
count_26,
count_27,
count_28,
count_29,
count_30,
count_31,
count_32,
count_33,
count_34,
count_35,
count_36,
count_37,
count_38,
count_39,
count_40,
count_41,
count_42,
count_43,
count_44,
count_45,
count_46,
count_47,
count_48,
count_49,
count_50 )
VALUES ( @szName,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0 )

SELECT
count_1,
count_2,
count_3,
count_4,
count_5,
count_6,
count_7,
count_8,
count_9,
count_10,
count_11,
count_12,
count_13,
count_14,
count_15,
count_16,
count_17,
count_18,
count_19,
count_20,
count_21,
count_22,
count_23,
count_24,
count_25,
count_26,
count_27,
count_28,
count_29,
count_30,
count_31,
count_32,
count_33,
count_34,
count_35,
count_36,
count_37,
count_38,
count_39,
count_40,
count_41,
count_42,
count_43,
count_44,
count_45,
count_46,
count_47,
count_48,
count_49,
count_50
FROM Achievements WHERE Name = @szName
END

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

END




go



CREATE PROCEDURE [dbo].[ACHIEVEMENTS_SAVE]
@szName varchar(10),
@count_1 int,
@count_2 int,
@count_3 int,
@count_4 int,
@count_5 int,
@count_6 int,
@count_7 int,
@count_8 int,
@count_9 int,
@count_10 int,
@count_11 int,
@count_12 int,
@count_13 int,
@count_14 int,
@count_15 int,
@count_16 int,
@count_17 int,
@count_18 int,
@count_19 int,
@count_20 int,
@count_21 int,
@count_22 int,
@count_23 int,
@count_24 int,
@count_25 int,
@count_26 int,
@count_27 int,
@count_28 int,
@count_29 int,
@count_30 int,
@count_31 int,
@count_32 int,
@count_33 int,
@count_34 int,
@count_35 int,
@count_36 int,
@count_37 int,
@count_38 int,
@count_39 int,
@count_40 int,
@count_41 int,
@count_42 int,
@count_43 int,
@count_44 int,
@count_45 int,
@count_46 int,
@count_47 int,
@count_48 int,
@count_49 int,
@count_50 int
AS

SET NOCOUNT ON

UPDATE Achievements SET
count_1 =  @count_1 ,
count_2 =  @count_2 ,
count_3 =  @count_3 ,
count_4 =  @count_4 ,
count_5 =  @count_5 ,
count_6 =  @count_6 ,
count_7 =  @count_7 ,
count_8 =  @count_8 ,
count_9 =  @count_9 ,
count_10 = @count_10,
count_11 = @count_11,
count_12 = @count_12,
count_13 = @count_13,
count_14 = @count_14,
count_15 = @count_15,
count_16 = @count_16,
count_17 = @count_17,
count_18 = @count_18,
count_19 = @count_19,
count_20 = @count_20,
count_21 = @count_21,
count_22 = @count_22,
count_23 = @count_23,
count_24 = @count_24,
count_25 = @count_25,
count_26 = @count_26,
count_27 = @count_27,
count_28 = @count_28,
count_29 = @count_29,
count_30 = @count_30,
count_31 = @count_31,
count_32 = @count_32,
count_33 = @count_33,
count_34 = @count_34,
count_35 = @count_35,
count_36 = @count_36,
count_37 = @count_37,
count_38 = @count_38,
count_39 = @count_39,
count_40 = @count_40,
count_41 = @count_41,
count_42 = @count_42,
count_43 = @count_43,
count_44 = @count_44,
count_45 = @count_45,
count_46 = @count_46,
count_47 = @count_47,
count_48 = @count_48,
count_49 = @count_49,
count_50 = @count_50
WHERE Name = @szName;

SET NOCOUNT OFF



go
Gracias hermano por la ayuda, la query se ejecuto bien , el problema es este, tal ves puedas decirme que me falta.

EXEC ACHIEVEMENTS_LOAD 'qweeee'
[QueryManager] State (42S02), Diagnostic: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Achievements'.
[QueryManager] State (25000), Diagnostic: [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 2.

Sino me equivoco necesito la DB de Archivements serias tan amable de pasarmela? Se agradece.


Técnico Informático Programador PHP SQL HTML CSS C++

Offline webmonkey #3 Posteado: March 05, 2024, 09:54:58 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 45
  • Gracias recibida: 48
  • ar
Gracias hermano por la ayuda, la query se ejecuto bien , el problema es este, tal ves puedas decirme que me falta.

EXEC ACHIEVEMENTS_LOAD 'qweeee'
[QueryManager] State (42S02), Diagnostic: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Achievements'.
[QueryManager] State (25000), Diagnostic: [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 2.

Sino me equivoco necesito la DB de Archivements serias tan amable de pasarmela? Se agradece.

Code: [Select]
USE [Muonline]
GO

/****** Object:  Table [dbo].[Achievements]    Script Date: 3/5/2024 9:53:55 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Achievements](
[Name] [varchar](10) NULL,
[count_1] [int] NULL,
[count_2] [int] NULL,
[count_3] [int] NULL,
[count_4] [int] NULL,
[count_5] [int] NULL,
[count_6] [int] NULL,
[count_7] [int] NULL,
[count_8] [int] NULL,
[count_9] [int] NULL,
[count_10] [int] NULL,
[count_11] [int] NULL,
[count_12] [int] NULL,
[count_13] [int] NULL,
[count_14] [int] NULL,
[count_15] [int] NULL,
[count_16] [int] NULL,
[count_17] [int] NULL,
[count_18] [int] NULL,
[count_19] [int] NULL,
[count_20] [int] NULL,
[count_21] [int] NULL,
[count_22] [int] NULL,
[count_23] [int] NULL,
[count_24] [int] NULL,
[count_25] [int] NULL,
[count_26] [int] NULL,
[count_27] [int] NULL,
[count_28] [int] NULL,
[count_29] [int] NULL,
[count_30] [int] NULL,
[count_31] [int] NULL,
[count_32] [int] NULL,
[count_33] [int] NULL,
[count_34] [int] NULL,
[count_35] [int] NULL,
[count_36] [int] NULL,
[count_37] [int] NULL,
[count_38] [int] NULL,
[count_39] [int] NULL,
[count_40] [int] NULL,
[count_41] [int] NULL,
[count_42] [int] NULL,
[count_43] [int] NULL,
[count_44] [int] NULL,
[count_45] [int] NULL,
[count_46] [int] NULL,
[count_47] [int] NULL,
[count_48] [int] NULL,
[count_49] [int] NULL,
[count_50] [int] NULL
) ON [PRIMARY]
GO

Gracias:


Offline lautha #4 Posteado: March 06, 2024, 03:08:02 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 1.544
  • Gracias recibida: 30
  • ar
Gracias hermano por la ayuda, la query se ejecuto bien , el problema es este, tal ves puedas decirme que me falta.

EXEC ACHIEVEMENTS_LOAD 'qweeee'
[QueryManager] State (42S02), Diagnostic: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Achievements'.
[QueryManager] State (25000), Diagnostic: [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 2.

Sino me equivoco necesito la DB de Archivements serias tan amable de pasarmela? Se agradece.

Code: [Select]
USE [Muonline]
GO

/****** Object:  Table [dbo].[Achievements]    Script Date: 3/5/2024 9:53:55 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Achievements](
[Name] [varchar](10) NULL,
[count_1] [int] NULL,
[count_2] [int] NULL,
[count_3] [int] NULL,
[count_4] [int] NULL,
[count_5] [int] NULL,
[count_6] [int] NULL,
[count_7] [int] NULL,
[count_8] [int] NULL,
[count_9] [int] NULL,
[count_10] [int] NULL,
[count_11] [int] NULL,
[count_12] [int] NULL,
[count_13] [int] NULL,
[count_14] [int] NULL,
[count_15] [int] NULL,
[count_16] [int] NULL,
[count_17] [int] NULL,
[count_18] [int] NULL,
[count_19] [int] NULL,
[count_20] [int] NULL,
[count_21] [int] NULL,
[count_22] [int] NULL,
[count_23] [int] NULL,
[count_24] [int] NULL,
[count_25] [int] NULL,
[count_26] [int] NULL,
[count_27] [int] NULL,
[count_28] [int] NULL,
[count_29] [int] NULL,
[count_30] [int] NULL,
[count_31] [int] NULL,
[count_32] [int] NULL,
[count_33] [int] NULL,
[count_34] [int] NULL,
[count_35] [int] NULL,
[count_36] [int] NULL,
[count_37] [int] NULL,
[count_38] [int] NULL,
[count_39] [int] NULL,
[count_40] [int] NULL,
[count_41] [int] NULL,
[count_42] [int] NULL,
[count_43] [int] NULL,
[count_44] [int] NULL,
[count_45] [int] NULL,
[count_46] [int] NULL,
[count_47] [int] NULL,
[count_48] [int] NULL,
[count_49] [int] NULL,
[count_50] [int] NULL
) ON [PRIMARY]
GO

Exelente amigo heart, te super agradezco  cool2
Funciona correctamente. Saludos!  cool22

Técnico Informático Programador PHP SQL HTML CSS C++

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
5 Replies
3356 Views
Last post November 20, 2017, 11:08:03 PM
by dulex
0 Replies
670 Views
Last post March 27, 2018, 03:41:22 AM
by faber
1 Replies
639 Views
Last post June 07, 2020, 02:32:55 PM
by Fagor
2 Replies
1623 Views
Last post March 20, 2024, 09:37:59 AM
by ivanovich
2 Replies
837 Views
Last post August 19, 2024, 07:24:47 AM
by T-LEGENDARY