Changed aliasing to be optional only when no where or with clauses are involved.