
Originally Posted by
skurbold
Dude i use this:
WZ_DISCONNECT_MEMB
CREATE PROCEDURE WZ_DISCONNECT_MEMB
@memb___id varchar(10)
AS
Begin
set nocount on
Declare @find_id varchar(10)
Declare @ConnectStat tinyint
Set @ConnectStat = 0
Set @find_id = 'NOT'
select @find_id = S.memb___id from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id = I.memb___id collate Chinese_PRC_CI_AS
where I.memb___id = @memb___id collate Chinese_PRC_CI_AS
if( @find_id <> 'NOT' )
begin
update MEMB_STAT set ConnectStat = @ConnectStat, DisConnectTM = getdate()
where memb___id = @memb___id
end
end
GO
and work fo me !!!