function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Can we use list of string for 'IN' operator for select statement.
like [Select field1,field2,.. from tablename where id IN stringlist]
Yes, you can use List, Set for IN.
List<tableName> lst = [select field1, field2 from tableName where Id IN : stringList];
Regards,
crmtech21
Thanks for the quick reply
You can use List , Set , Map.keySet with "IN" operator in query
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Also you can use Nested queries to get an id.
Just like : Select name from Account where id IN (Select AccountId from Contact where Email = 'foxy@salesforce.com')
Yes, you can use List, Set for IN.
List<tableName> lst = [select field1, field2 from tableName where Id IN : stringList];
Regards,
crmtech21
All Answers
Yes, you can use List, Set for IN.
List<tableName> lst = [select field1, field2 from tableName where Id IN : stringList];
Regards,
crmtech21
Thanks for the quick reply
You can use List , Set , Map.keySet with "IN" operator in query
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Also you can use Nested queries to get an id.
Just like : Select name from Account where id IN (Select AccountId from Contact where Email = 'foxy@salesforce.com')