You need to sign in to do that
Don't have an account?
dkorba2k5
Dynamic SOQL
Before I go too far down this path can someone answer if this is able to be done using Dynamic SOQL.
I know I can dynamically create the SELECT string using this. But can I bind to a set in order to reproduce the equivalent of this:
assume I've already populated a list of id's.
SELECT id FROM Account WHERE Id in :idset
How can I create that as a query string that allows the injection of the set of id's into it.
I know I can dynamically create the SELECT string using this. But can I bind to a set in order to reproduce the equivalent of this:
assume I've already populated a list of id's.
SELECT id FROM Account WHERE Id in :idset
How can I create that as a query string that allows the injection of the set of id's into it.
I don't know of a way to use bindings in dynamic SOQL, but I have done what you describe by manually building an "IN" clause from a list of ID's.
Hope that helps.
Jeremy Kraybill
Austin, TX