MS Query - Numeric Value out of Range - Salesforce

Discussion of open issues, suggestions and bugs regarding usage of ODBC Drivers
Post Reply
pwills01
Posts: 2
Joined: Tue 26 Sep 2017 22:41

MS Query - Numeric Value out of Range - Salesforce

Post by pwills01 » Tue 26 Sep 2017 22:50

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

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

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

Post by MaximG » Wed 27 Sep 2017 07:11

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

pwills01
Posts: 2
Joined: Tue 26 Sep 2017 22:41

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

Post by pwills01 » Wed 27 Sep 2017 14:10

PC_Status_Date__c is defined as a Salesforce primitive DateTime.

the error comes in the aforementioned query

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

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

Post by MaximG » Fri 29 Sep 2017 07:02

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)

Post Reply