Using a numbered parameter (such as ?4) more than once in an SQL statement
Can a numbered parameter be used more than once in an SQL statement, such as:
select * from mytable where id1=?1 and id2=?1 and ...
I had a feeling I'd read somewhere that this works, but I can't find it now. I'd like to know that it's "works as intended and guaranteed", rather than "happens to work in this version but no promises for future versions".
Thanks for an insight.
It works as intended. And I don't at the moment know where I might clarify that point in the documentation.
On an unrelated note, when I mentioned this on the Xojo User Forum, the spell checker decided that you are, in reality, Richard Hippogriffs.
(3) By Larry Brasfield (LarryBrasfield) on 2020-05-20 15:21:08 in reply to 1 [link] [source]
I have needed that feature, and relied upon it after examining the docs, specifically Binding Values to Prepared Statements, at the paragraph beginning "The second argument is ...".