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
Nevin O'Regan 3Nevin O'Regan 3 

SOQL Query to return matching fields

I have to Auto Number fields on the Opportunity and the Quote objects. They are both running using the same format which is confusing for users. I'd like to identify the records that have matching Auto Number field values. How can I achieve this through SOQL?
Best Answer chosen by Nevin O'Regan 3
Greg HGreg H
You can't. SOQL isn’t that robust yet. Grab the Name and Id from Opportunity. Then grab the Name and Id from Quote. Then use your preferred method to compare and find Name value matches between the records. You can get the data out using reports, data loader, etc. You can compare the records using a local database (like Access) or spreadsheet program (such as Excel).