You need to sign in to do that
Don't have an account?
rajuravula
how to write a SOQL query where we don't know the value of "WHERE" condition..
Hiii.....how to write a SOQL query where we don't know the value of "WHERE" condition..
Thank you
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hiii.....how to write a SOQL query where we don't know the value of "WHERE" condition..
Thank you
List<Account> Acc = new List<Account>();
Acc = [select id,Name from Account];
you can use the above
-rdinakaran
Check out Database.query(). You can compose the entire query as a string then submit the SOQL.
Thanks for reply...here my requirement is..
through the trigger i wanna update a field from retrieving it from picklist of another object....So i have written a query...
"Then it will says List has more than one values to be assigned to a field"...then i wanna write a query for only one value of picklist....we can use WHERE but we don't know the value of where condition...
So,please give detalied solution for this...........
aField.getDescribe().getPicklistValues()
will give you a list of the possible picklist values. You should be able to create your where clause from that using either string concatenation or String.Format().