66 lines
1.9 KiB
Transact-SQL
66 lines
1.9 KiB
Transact-SQL
USE [LosaGame]
|
|
GO
|
|
|
|
/****** Object: StoredProcedure [dbo].[game_game_get_data] Script Date: 2017-12-07 오후 6:59:20 ******/
|
|
DROP PROCEDURE [dbo].[game_game_get_data]
|
|
GO
|
|
|
|
/****** Object: StoredProcedure [dbo].[game_game_get_data] Script Date: 2017-12-07 오후 6:59:20 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
|
|
|
|
|
|
--IF OBJECT_ID('dbo.game_practice_get_list','P') IS NOT NULL
|
|
--
|
|
-- DROP PROC dbo.game_practice_get_list
|
|
--
|
|
--GO
|
|
|
|
-- =============================================
|
|
-- Subject : dbo.game_practice_get_list
|
|
-- DBA :
|
|
-- DATE : 2014-03-03
|
|
-- Description : 훈련하기 데이터
|
|
-- =============================================
|
|
|
|
Create PROCEDURE [dbo].[game_game_get_data]
|
|
(
|
|
@userID varchar(12)
|
|
)
|
|
As
|
|
|
|
SET NOCOUNT ON
|
|
|
|
|
|
DECLARE @CURRENTDATE DATETIME
|
|
DECLARE @CONNECTDATE DATETIME
|
|
|
|
SET @CURRENTDATE = GETDATE();
|
|
SET @CONNECTDATE = ( SELECT conndate FROM dbo.userGameDB WHERE accountIDX IN ( SELECT accountIDX FROM dbo.userMemberDB WHERE userID = @userID ))
|
|
|
|
BEGIN
|
|
IF( @CURRENTDATE < @CONNECTDATE )
|
|
SET @CONNECTDATE = @CURRENTDATE
|
|
END
|
|
|
|
SELECT a.accountIDX, b.userID, b.nickName, a.userState, a.gameMoney
|
|
, a.conn_count, @CONNECTDATE, a.userLevel, a.userEXP--, a.relateLevel
|
|
, b.eventType, isNull(c.class,0) as 'class', b.joinType, b.regDate, a.regionType
|
|
, a.rencpoint, a.renspoint, isNull(c.region,0) as 'region', b.cpType, ISNULL(d.cpID, '') AS 'cpID'
|
|
, ISNULL(d.note, '') AS 'cpUNIQ', b.limitType, b.limitDate, a.userFishingLevel, a.userFishingEXP
|
|
, a.refillData, a.userExcavationLevel, a.userExcavationEXP, a.userHerocEXP, a.userHerosEXP, a.practice
|
|
FROM userGameDB a WITH( NOLOCK )
|
|
JOIN userMemberDB b WITH( NOLOCK )
|
|
ON a.accountIDX = b.accountIDX
|
|
LEFT JOIN userRankingDB c WITH( NOLOCK )
|
|
ON a.accountIDX = c.accountIDX
|
|
LEFT JOIN userCooperationDB d WITH( NOLOCK )
|
|
ON a.accountIDX=d.accountIDX WHERE b.userID = @userID
|
|
|
|
|
|
|
|
|