Why would my named query fail to run in a script if it works in the query browser?
I have a named query with one parameter. When I copy/paste the query into the query browser and replace the parameter with a number it runs and returns the results I expect. However, when I use the system.db.runNamedQuery() method in the script console I get a “You have an error in your SQL syntax” error message.