Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 05.05.2007, 20:59   #3
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Code:
/********************************************        
lin_ResetSociality
 set sociality
INPUT        
 @char_id
 @sociality
 @sulffrage
 @last_changed
OUTPUT        
return        
       
made by        
 carrot        
date        
 2004-07-4
change 

- added datetime conversion by FidoW -
********************************************/        
CREATE PROCEDURE [DBO].[lin_ResetSociality]
(        
 @char_id INT,
 @sociality INT,
 @sulffrage INT,
 @last_changed nvarchar(20)
)        
AS        
SET NOCOUNT ON   
 
SET @last_changed = CONVERT( datetime, @last_changed, 101 )

IF EXISTS(SELECT  * FROM user_sociality WHERE char_id = @char_id)
BEGIN
	UPDATE user_sociality 
	SET sociality = @sociality , used_sulffrage = @sulffrage , last_changed = @last_changed
	WHERE char_id = @char_id
END
ELSE
BEGIN
	INSERT INTO user_sociality (char_id, sociality , used_sulffrage , last_changed ) VALUES (@char_id, @sociality , @sulffrage , @last_changed )
END
GO
        
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO
FidoW is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:42.