decomp DBCServer_Release and inspect/document database
This commit is contained in:
parent
4b267cbe05
commit
7834b98bf0
28222 changed files with 843300 additions and 144 deletions
27
decomp/schema/RustyHearts/procs/up_get_guild_load_info.sql
Normal file
27
decomp/schema/RustyHearts/procs/up_get_guild_load_info.sql
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_guild_load_info]
|
||||
(
|
||||
@server SMALLINT
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT T.[guild_id],
|
||||
C.[member_cnt],
|
||||
ISNULL(S.[s_cnt],0) AS is_storage_own,
|
||||
ISNULL(SI.s_cnt, 0) AS storage_item_cnt,
|
||||
CASE WHEN ISNULL(SL.[s_cnt],0)>100 THEN 100 WHEN ISNULL(SL.[s_cnt],0)>0 THEN ISNULL(SL.[s_cnt],0) ELSE 0 END AS storage_log_cnt,
|
||||
CASE WHEN ISNULL(E.[s_cnt],0)>100 THEN 100 WHEN ISNULL(E.[s_cnt],0)>0 THEN ISNULL(E.[s_cnt],0) ELSE 0 END AS exp_log_cnt,
|
||||
ISNULL(K.[s_cnt], 0) AS skill_cnt
|
||||
FROM GuildTable AS T WITH (NOLOCK)
|
||||
INNER JOIN ( SELECT M.[guild_id], count(M.[guild_id]) AS member_cnt FROM GuildMemberTable AS M WITH (NOLOCK) GROUP BY M.[guild_id] ) AS C ON C.[guild_id]=T.[guild_id] AND T.[server]=@server AND T.[block_type]=0
|
||||
LEFT OUTER JOIN ( SELECT t1.[guild_id], count(t1.[guild_id]) AS s_cnt FROM tbl_Guild_Storage_Info AS t1 WITH (NOLOCK) GROUP BY t1.[guild_id] ) AS S ON S.[guild_id]=C.[guild_id]
|
||||
LEFT OUTER JOIN ( SELECT t2.[guild_id], count(t2.[guild_id]) AS s_cnt FROM tbl_Guild_Storage_Item AS t2 WITH (NOLOCK) GROUP BY t2.[guild_id] ) AS SI ON SI.[guild_id]=S.[guild_id]
|
||||
LEFT OUTER JOIN ( SELECT t3.[guild_id], count(t3.[guild_id]) AS s_cnt FROM tbl_Guild_Storage_Use_List AS t3 WITH (NOLOCK) WHERE t3.[use_type] IN (0, 1) GROUP BY t3.[guild_id] ) AS SL ON SL.[guild_id]=S.[guild_id]
|
||||
LEFT OUTER JOIN ( SELECT t4.[guild_id], count(t4.[guild_id]) AS s_cnt FROM tbl_Guild_Exp_List AS t4 WITH (NOLOCK) GROUP BY t4.[guild_id] ) AS E ON E.[guild_id]=C.[guild_id]
|
||||
LEFT OUTER JOIN ( SELECT t5.[guild_id], count(t5.[guild_id]) AS s_cnt FROM tbl_Guild_Skill AS t5 WITH (NOLOCK) GROUP BY t5.[guild_id] ) AS K ON K.[guild_id]=C.[guild_id]
|
||||
|
||||
--주의 : t3.[use_type] IN (0, 1) 변경 시 [up_get_guild_storage_use_list] 프로시저도 내부도 변경할것!
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue