You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacopo Cappellato (JIRA)" <ji...@apache.org> on 2014/04/21 14:51:18 UTC

[jira] [Closed] (OFBIZ-1001) Oracle Database Date Query Problems

     [ https://issues.apache.org/jira/browse/OFBIZ-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato closed OFBIZ-1001.
------------------------------------

    Resolution: Later

> Oracle Database Date Query Problems
> -----------------------------------
>
>                 Key: OFBIZ-1001
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1001
>             Project: OFBiz
>          Issue Type: Wish
>          Components: framework
>         Environment: SUSE Linux 10 & Oracle DB
>            Reporter: Michael Imhof
>            Assignee: David E. Jones
>            Priority: Minor
>         Attachments: oraclePatch.txt
>
>
> Problem with the date conversion.
> The Following SQL Statement is not working on a Oracle Database
>          SELECT .... WHERE RUN_TIME <= '2007-05-15 07:45:10.875' AND ....
> Using an Oracle database, this statement is wrong and generates the ORA-01861 error.
> The statement should look like this:
>          SELECT .... WHERE RUN_TIME <= TO_DATE('2007-05-15 07:45:10', 'YYYY-MM-DD HH:MI:SS') AND .... 
> Solutions
> =======
> 1. Use Oracle Trigger: http://docs.ofbiz.org/display/~jacopoc/OFBiz+and+Oracle
> 2. Set Oracle Date Format: ALTER SYSTEM set NLS_TIMESTAMP_FORMAT='RRRR-MM-DD HH24:MI:SS.FF' 
> 3. This patch. 
> The patch is a general solutions based on the design hibernate is using. (Every driver has a Dialect class).
> All databases are working like before because the default implementation is just returning the input string (only
> for oracle databases, a special string is returned).



--
This message was sent by Atlassian JIRA
(v6.2#6252)