Feedback
Did this article resolve your question/issue?

   

Article

Error occurred when processing a query with 'Date Literals' using Salesforce JDBC driver 6.0

Information

 
TitleError occurred when processing a query with 'Date Literals' using Salesforce JDBC driver 6.0
URL Nameerror-occurred-when-processing-a-query-with-date-literals-using-salesforce-jdbc-driver-6-0
Article Number000139104
EnvironmentProduct: Progress DataDirect for JDBC for Salesforce Driver
Version : 6.0
OS: JAVA
Database : Salesforce
Application: All supported applications
Question/Problem Description

When executing a SELECT query with 'Date Literals', for example:  
SELECT Product_Name FROM Currency_Checkbox_String_Date_Email WHERE Product_Create_Date < LAST_90_DAYS;
error occurred which is described below in the "Error message" section.
The only Date Literal that doesn't cause an error is "TODAY". 
The list of Date Literals supported in Salesforce can be found here: 
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm

 

Steps to Reproduce
Clarifying Information
Error Message[DataDirect][SForce JDBC Driver][SForce]syntax error or access rule violation: column not found: LAST_90_DAYS)
Defect Number
Enhancement Number
Cause
The link provided above is for SOQL functions, not SQL functions.
So the Date Literals used in this case are SOQL functions, not SQL functions.
Resolution
When using SQL, the SQL date and time functions should be used which are supported by JDBC (Link is given below).
 
Workaround
Notes
Last Modified Date8/23/2019 3:14 PM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.