Has any one done SQL to SOQL Conversion for Salesforce.com Objects?
-
Are you wanted to transform SQL statements you have into SOQL or do you want to do what Jeremy Frey is describing? – Scott Gottreu Sep 01 '09 at 20:34
3 Answers
Yes.
ForceAmp makes a product called dbAmp, which lets you add Salesforce as a linked server in MS SQL.
This lets you perform queries directly against Salesforce.com data inside a SQL Server database, with syntax such as:
SELECT a.Id, a.Name, c.Name
FROM Salesforce...Account a
LEFT JOIN Salesforce...Contact c ON (a.ID = c.ID)
WHERE a.Name LIKE '%, Inc.'
Which, in essence is the same as the SOQL
SELECT Id, Name, (SELECT Name From Contacts) FROM Account WHERE Name LIKE '%, Inc'
That said, the best use case of dbAmp isn't to replace your SOQL with SQL, but to use TSQL to do some advanced manipulation with your Salesforce.com data. Don't use it as a crutch to avoid learning SOQL -- SOQL is very expressive and robust, and several orders of magnitude faster when doing multiple-object queries, even in the trivial example I posted above (3 seconds vs 3 minutes, and counting...)

- 2,334
- 2
- 22
- 26
No.
If you want a more meaningful answer than that (or "yes") then you may want to expand on your question a bit. Are you having a specific issue? Are you looking for opinions on tools to use?

- 46,766
- 14
- 87
- 128