I am puzzling over a parameterized named query that works fine in Vision query bindings, but fails as a query binding on the data property of a Perspective table. The error shows
syntax error on token: 'End of Expression' (Line 0 Character 0)
You shouldn't need to pass in the parameter you call "tbl" as you don't use it in either query.
I would test your actual values and make sure SQL can handle them. If I had to guess the format of your dates is different in Perspective versus Vision.
You're getting an Error_Configuration, which means the error is not in the query but in how you're getting the parameters.
In this case, I'm guessing removing the 3rd parameter will fix it. Because the value you passed it is not actually a string.
Either remove it or quote the value to make it a string ("Batches" instead of Batches).
Thanks for the responses. It doesn't have to do with the extra parameter as that is unused and I have experimented with and without it. I think bmeyers is on the right track with date formats. I'll do some more experimenting.
In Vision, query bindings accept property references or literal strings, not true expressions.
In Perspective, instead of implementing "one-off" not-quite-expression contexts, basically everything that can accept a property reference is just an expression. So you have to have a valid expression. Batch is not, because there's no such keyword Batch in the expression language parser. You must wrap it in quotes to make a 'real' expression (a string literal "Batch").
@pascal.fragnoud and @PGriffith, you guys were right. I could have sworn that I had already tried adding quotes in one of my permutations, but I must have had something else wrong when I did. I should remember to only modify one variable at a time in an experiment!