Debug Problematic Application SQL Queries

If your query does not seem to be running correctly, try running it in SQL Commands. Any of these approaches will test your query outside the context of your application, making it easier to determine what the problem is.