Page 1 of 1

MS Query - Numeric Value out of Range - Salesforce

Posted: Tue 26 Sep 2017 22:50
by pwills01
we have a financial analyst using the ODBC for Salesforce to retrieve information from our Salesforce Implementation....on our Query we are getting the MS Query error 'numeric value out of range'. I have isolated it to a Salesforce Date/Time field . The query returns about 11K rows, most of which (10,100) do not have the field populated. The offending field is PC_Status_date__c

Code: Select all

SELECT P.Place_of_Service__c, A.Name,
 P.Name, P.DOS_Scheduled__c, P.Status__c,
B.First_Name__c, B.Last_Name__c, P.PC_Status_date__c
FROM Patient_Choice_Case__c P
Inner Join Patient__c B on P.Patient__c = B.ID
Inner Join Account A on P.place_of_Service__c=A.ID
WHERE P.Place_of_Service__c In (
'0013600000wKnQ0',
'0013600000vFH1M')
I have tried to CAST & COALESCE - but no luck

Re: MS Query - Numeric Value out of Range - Salesforce

Posted: Wed 27 Sep 2017 07:11
by MaximG
Please specify what exact datatype the PC_Status_date__c filed has in the Patient_Choice_Case__c table. Probably, you can define what exact value stored in this field causes an error when receiving query results in Microsoft Query

Re: MS Query - Numeric Value out of Range - Salesforce

Posted: Wed 27 Sep 2017 14:10
by pwills01
PC_Status_Date__c is defined as a Salesforce primitive DateTime.

the error comes in the aforementioned query

Re: MS Query - Numeric Value out of Range - Salesforce

Posted: Fri 29 Sep 2017 07:02
by MaximG
We tested our driver work when retrieving the fields of the DateTime type in our test environment.
Unfortunately, we could not reproduce the described issue. Do we understand correctly that the error can be caused by a simple
query like this: SELECT P.PC_Status_date__c FROM Patient ... _Case__c P
In addition, whether you have a possibility to provide a temporary limited access to your Salesforce account to investigate the issue.
For this, you can use the e-support form (https://www.devart.com the "Support"\"Request Support" menu)