Function to attach Active selection in an existing SELECT Statement