select fspro_userid as superUserId from tbl_FSPro_members where ownerId = and fsl_tablecode = and email = and loginEnabled = 1 and allowSuperUser = 'Y' select * from tbl_sec_aliasloginusers where emailaddress = select a.AttrbID as secureAreaId from tbl_SEC_Attributes a inner join tbl_SEC_AttributeTypes at on at.AttrbTypeId = a.AttrbTypeId and at.AttrbTypeCode = 'STP' where OwnerID = and FSL_TableCode =