Code Project

Link Unit

Showing posts with label SalesForce. Show all posts
Showing posts with label SalesForce. Show all posts

Tuesday, January 13, 2015

Error 13005 : Error translating SQL statement: line dbAMp

We started receiving error 13005 while executing sf_replicate. The error was due to xp_cmdshell which is making call to dbAmp.exe.

We also noted that sf_replicate3 was working fine, a peek into procedure revealed that it uses "Select * into XYZ from salesforce...XYZ" hence works.

Solution:
 
To resolve, upgrade to the latest version of DBAmp using the instructions at http://www.forceamp.com/upgrade.htm
 
 

Thursday, August 08, 2013

Why is the Data Loader importing dates incorrectly?


We were trying to upload to an object.Most of the dates uploaded exactly as defined in the CSV file, however others were one day out e.g 2-Jul uploaded as 1-Jul.

While using DataLoader it turns out that the Time Zone setting within data loader has a big impact.

Solution #1:

we changed it to "GMT" all the dates loaded without issue.
We also check the "Use European date format (dd/mm/yyyy)" within Data Loader.

Another option we worked out is specifying these setting in process-conf.xml file.

Solution #2 (for Automating Data Loader)
process-conf.xml
....


....

specified the dates in CSV file as dd/mm/yyyy

Hope it Helps

Friday, August 03, 2012

SalesForce Query is either selecting too many fields or the filter conditions are too complicated.


I get the following error when I try to replicate the custom object: Query is either selecting too many fields or the filter conditions are too complicated.

Even a simple query like Select * from SalesForce...Object was also returning same error.



Reason
This error is from the salesforce.com server and occurs when the table has too many formula fields for the salesforce server to return query results. Internally at the salesforce server, when a query occurs the select list is modified and the calculated fields are replaced with their formulas. Then the sf server tries to execute it and determines that the query is too complex.
 
Solution
You could try using a feature of DBAmp called Column Subsets which allow you to replicate subsets of columns of a table and then glue them together locally. This effectively decreases the number of formula fields in the query. See Column Subset Views in Chapter 2 of the DBAmp doc.

exec sf_replicate 'SALESFORCE','Object_ColumnSubsetAM'
exec sf_replicate 'SALESFORCE','Object_ColumnSubsetNZ'


and then use following to construct the table

Select column1,column2,column3 into Object
from Object_ColumnSubsetAM AM
inner Join Object_ColumnSubsetNZ NZ on AM.id = NZ.id

Alternatively, you can just construct multiple select statements yourself with subsets of the columns.