You need to sign in to do that
Don't have an account?
fiona gentry
How to Write SOQL for 2 custom objects who have same fields Level_1__c, Level_2__c,Level_3__c
Dear gurus,
I have custom object1 named Case_Type_Data__c with Level_1__c, Level_2__c,Level_3__c
and i have another custom object2 named ERT_Case_Type__c with same fields Level_1__c, Level_2__c,Level_3__c
A batch copied data from ERT_Case_Type__c to Case_Type_Data__c
Now i try to write SOQL in workbench to find out which records didnt get copied
Workbench throws error
Please provide me a Join SOQL to get records which didn't got copied from ERT_Case_Type__c to Case_Type_Data__c
Regards
Fiona
I have custom object1 named Case_Type_Data__c with Level_1__c, Level_2__c,Level_3__c
and i have another custom object2 named ERT_Case_Type__c with same fields Level_1__c, Level_2__c,Level_3__c
A batch copied data from ERT_Case_Type__c to Case_Type_Data__c
Now i try to write SOQL in workbench to find out which records didnt get copied
Select Level_1__c,Level_2__c,Level_3__c From Case_Type_Data__c Where Level_3__c NOT IN (Select Level_3__c From ERT_Case_Type__c)
Workbench throws error
MALFORMED_QUERY: semi join sub selects can only query id fields, cannot use: 'Level_3__c'Please note Id of ERT_Case_Type__c and Id of Case_Type_Data__c doesnt matches hence cant use Id
Please provide me a Join SOQL to get records which didn't got copied from ERT_Case_Type__c to Case_Type_Data__c
Regards
Fiona
All Answers
If this field is, say, a text field, you'd need to either extract the data from Salesforce and analyze it locally, or write Apex code to perform queries against the two objects separately and draw out the data you need. Given your statement that you initially used Batch Apex, the latter approach is likely infeasible due to data volume.
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.