• To convert fast from INT to HEX :

    right(master.dbo.fn_varbintohexstr(cast( Disconnection_cause as INT) ),2)