Fix for Ambiguous SQL Clause