function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Query Mutiple tables using salesforce web service with some condition

I am using salesforce api for one of my Biz talk integration project .
I want to fire some query with multiple tables say account ,contact etc and with some where condition like urn value null .
Can any one tell me how can i do this as Query method does not support joins .
Please reply as soon as possible if any one knows solution for this
Thanks in Advance
Gareth DaviesGareth Davies


Can you be more specific about what you are trying to do.

Do you want to populate many object types with the same query condition or do you want to use the result of one query to populate a second (i.e. a join).

Have a look at Datascope (AppExchange) or Explorer (sourceforge) perhaps that will help you test the SOQL possibilities.



Dear Gareth

First of all thanks a lot for your instant reply.

Well i want to populate many object with same query condition say all account details with their opportunities with some where condition like some value =1 or so on.

It is not necessary that i should use query object only any method which gives me relational output will do

Thanks in Advance



Gareth DaviesGareth Davies

Sounds like a two-phase query would be the best approach to that.


Select all Opportunities where condition is met.

Generate a unique list of AccountID's from Opportunities

Query those for those Accounts using a retreive call

There is no way to perform this as a single operation (that I am aware of).




Thanks for your reply.
See my requirement is i want all account details with their address,opportunities in one single result as i need to pass those values to Biz talk.
Solution proposed by you will give me only inner most data.
Thanks in Advance

If you're using BizTalk, then you already have SQL Server. Using DBAmp , you can excute the SQL statement you need to pull the data (including outer joins).

Let me know if need more info or have any questions.

Bill Emerson

DBAmp Developer



Thanks Bill

Yes but this product you are talking is not free product right....

Thanks In Advance

Sachin Sheth


$695 unlimited users.. Got to pay the light bill! :smileyhappy:


So is there really no other way to perform a very standard database query (ie more than one table) without either paying for this product or writting very bespoke queries???
Do salesforce have any plans for introducing the join into their SOQL?
There are no other way to perform what you want.
That's for sure.

I felt the same frustration when I started to use the Sforce API :D
The number of queries becomes rapidely big...

You should better use "retrieve" instead of "query" in certain cases.
"retrieve" gets some objects based on a list of objects ID you have to specify in parameters.

Good luck