You need to sign in to do that
Don't have an account?
Zareh
Select DISTINCT values
Hi All,
I am trying to do a SELECT DISTINCT values from one of our custom tables. The equivalent of
SELECT DISTINCT fieldA,fieldB from tableC
But it looks like there is no way to do this with the Salesforce API am I correct ? if yes then how can I run a query like this ?
Later on I will need to run a query to get the count of distinct values in a table,
I can do SELECT count() FROM tableA
I can do SELECT count() FROM tableA
but cant do SELECT DISTINCT count() FROM tableA
Thanks
This post summarizes some of the other differences between SOQL and SQL. Hope this helps.
Message Edited by RickyG on 02-01-2008 08:53 AM
Thank you very much Rick for your suggestion.
We will try this workaround, its just strange that we cant really do a simple thing like select distinct directly.
Cheers
Zareh
Could you please post some example for it.It seems little confuse to me.
I need distinct activity with one account in some peroid of time frame.
Suppose for one account I just want to know that that account is having call or not no matter how many time it has call log in one month peroid of time.
It would be great if you can show some exmaple like this.
-Thanks in advance
Please allow Destinct.
Having a lookup is an option.
However, with regards to interfacing data, lots of times it is not lookups, just raw; therefore the Select Distinct is justified.