You need to sign in to do that
Don't have an account?

Doubt:SOQL Query
Hi Everyone,
I have problem in soql query,
Standard object:Account
Custom Object :accproducts__c
if anybody knows the solution please tell me.
Thanks & Regard,
M. Sivasankari
I have problem in soql query,
select a.Name,a.ID,ap.Product__c from account a,accproducts__c ap where a.id=ap.account__c and ap.Product__r.name='GenWatt Propane 1500kW' and a.industry='banking';error:Unknown error parsing query
Standard object:Account
Custom Object :accproducts__c
if anybody knows the solution please tell me.
Thanks & Regard,
M. Sivasankari
Thankyou for your reply,
Again it shows the same error.
error:Unknown error parsing query
Thanks,
For your query:
In query editor it show an error as Unknown error parsing query
But,
In apex class it show an error as:
A driving SObject type has already been set, all other entity types in the FROM clause must be relationships to the initial object. The driving object is Account.
My apex code: VFP code:
Thanks,
SELECT Name,(select id,Product__c from accproducts__r ) FROM Account WHERE Industry =:searchStr
Please replace "accproducts__c" with child relationship name
accproducts__c object is intermediate between the account and product Standard object..
thanks,
Your query: In my case industry and product(Product__c) are input,
industry field=Account object(standard)
Product__c field =accproducts__c(custom object)
I tried below query but doesnt work.. it takes only industry as input.
Thanks
SELECT Name FROM Account;
but having following error message
Unknown error parsing query
Thanks