• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Help with Exchange Online Time query. MEMB_STAT not updating, showing NULL OnlineHour

Newbie Spellweaver
Joined
Mar 19, 2015
Messages
79
Reaction score
4
As i tried to explain in the title. This query doesnt update "OnlineHours" Column on MEMB_STAT table. It shows NULL after i log off with the account.

Help me solve this. i can kinda read what it does but im pretty new understanding SQL and writing it.
Wow why the fcck i cant format the query? i tried all
Code:
CREATE PROCEDURE WZ_DISCONNECT_MEMB @memb___id varchar(10) AS Begin  set nocount on  Declare [USER=1333416677]Find[/USER]_id varchar(10)  Declare [USER=1333459481]Connects[/USER]tat tinyint Set [USER=1333459481]Connects[/USER]tat = 0  Set [USER=1333416677]Find[/USER]_id = 'NOT' select [USER=1333416677]Find[/USER]_id = S.memb___id from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id = I.memb___id  where I.memb___id = @memb___id if( [USER=1333416677]Find[/USER]_id <> 'NOT' )  begin  update MEMB_STAT set ConnectStat = [USER=1333459481]Connects[/USER]tat, DisConnectTM = getdate(), OnlineHours = OnlineHours+(DATEDIFF(hh,ConnectTM,getdate())) where memb___id = @memb___id -- TIMEONLINE MOD by john_d end end GO
 
Last edited:
Back
Top