日期:2014-05-18 浏览次数:20584 次
ALTER VIEW [dbo].[GetAllUser] AS SELECT Users_1.UID, Users_1.Email, Users_1.Mobile, Users_1.UserID, Users_1.PassWord, Users_1.UserRank, Users_1.IsState, Users_1.IsVIP,dbo.UserInfo.CreateTime, CASE WHEN charindex('.', '' + r.RUID + '') > 0 THEN replace(r.RUID, 'http://', '') WHEN r.RUID IS NULL THEN '--' ELSE (SELECT UserID FROM dbo.Users WHERE (UID = r.RUID)) END AS RUserID, v.ValPhone, dbo.UserInfo.QQ,udb.Reasons,udb.DisableTime FROM dbo.Users AS Users_1 INNER JOIN dbo.UserInfo ON Users_1.UID = dbo.UserInfo.UID LEFT OUTER JOIN dbo.ReferrerInfo AS r ON Users_1.UID = r.UID LEFT OUTER JOIN dbo.UserValidation AS v ON Users_1.UID = v.UID LEFT OUTER JOIN dbo.UsersDisable as udb on Users_1.UID=udb.UID GO