I'm trying to push values into a Time custom field (on a custom object). If I declare the SQL server type as nvarchar(40) populated with '12:00:00Z' I get "Value too large max length:0 Your length: 9". if it is data type time I get "Error: Unable to map column Stop_Reports_From__c of type 145.".
dbAmp version 3.6.6.0
SQL Server 2014
All works fine if the value is null, but not if I specify a time value.
Any help would be much appreciated.
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.


-
Try changing the data type of the column to datetime from time and make sure the time value you are putting into that column is of the correct format.
-
-
Thanks, I get a similar error though: Value too large max length:0 Your length: 3
In case it helps, here is a simplified extract of the SQL:
SELECT Convert(nchar(18), null) Id, Id Contract__c, Convert(DateTime, '12:00:00Z') Stop_Reports_From__c, Convert(nvarchar(255), null) Error
INTO Reporting_Schedule_Exclusion__c_ins
FROM Custom_Contract__c
EXEC SF_BulkOps 'insert', @sfInstance, 'Reporting_Schedule_Exclusion__c_ins'
I have also tried convert(datetime, '1-Aug-2018 12:00:00') and get "Value too large max length:0 Your length: 7" -
-
Run a query against SFFields and see what the column data type is for the Stop_Reports_From__c of the Custom_Contract__c object.
Select * from SALESFORCE...sys_sffields -
-
-
-
EMPLOYEE
1There is a bug in SF_BulkOps when pushing to a time field. Instead use SF_TableLoader.
So, in the input table create Stop_Reports_From__c as an nvarchar(40) and enter your time (example: 12:00:00Z), then use SF_TableLoader to push the data:
exec SF_TableLoader 'Insert', 'SALESFORCE', 'Reporting_Schedule_Exclusion__c_ins'
Check the Reporting_Schedule_Exclusion__c_ins_Result table for any errors.-
Thanks, this has solved it.
-
-
-
-