My Oracle Support Banner

Incorrect Data are Inserted Into Datastores when Using the Single Quote (') Character to Delimit Date Values in Jython Scripts (Doc ID 424264.1)

Last updated on DECEMBER 20, 2019

Applies to:

Oracle Data Integrator - Version 4.1.01.05 and later
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

Incorrect data are inserted into Datastores when using the single quote (') character to delimit Date values in Jython scripts.

For example, the following script uses the os.system function in a Jython script :

import os
if os.system('osql.exe -S <SERVER_NAME> -U<LOGIN_ID> -P<PASSWORD> -Q "INSERT INTO <DATABASE>.dbo.<TABLE> (<DATE_COLUMN>) VALUES ('08/13/2005 09:15:24')"') <> 0:
raise "error in SQL"

fails at the " VALUES (' " part.

Note: In the above replace <SERVER_NAME> , <LOGIN_ID> , <PASSWORD>, <DATABASE>.dbo.<TABLE> (<DATE_COLUMNN>)   with the actual values from your environment.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.