Publishing using a CURRENT_DATE function as table default value failed when generating into table
search cancel

Publishing using a CURRENT_DATE function as table default value failed when generating into table

book

Article ID: 376658

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

Performed the following test in Oracle:

  1. The properties file contains the following definition:

       tdmweb.TDMPublishService.sqlOutput.keywords.ORACLE=SYS_GUID(), SYSDATE, CURRENT_DATE, CURRENT_TIMESTAMP, SYSTIMESTAMP, UID, USER

  2. The Oracle table is created, including the use of a default value:

       CREATE TABLE SCRAMBLE.JFB_ORA_TEST143_CURRENTDATE (
         ID NUMBER(10),
         DEF_CURRENTDATE DATE DEFAULT CURRENT_DATE)

  3. As seen above, the default value is CURRENT_DATE and that it is present in the properties file.

  4. When generating the SQL query in a file and run it manually, everything works fine.

       "INSERT INTO "SCRAMBLE"."JFB_ORA_TEST143_CURRENTDATE" ("ID","DEF_CURRENTDATE") VALUES (1,CURRENT_DATE);"

  5. When generating the data directly in the table, the job fails with the following message: 

       "Value for DEF_CURRENTDATE is invalid for datatype, value:CURRENT_DATE"

     

The expected result should be the same in both ways. CURRENT_DATE is not treated correctly when generating data into the table.

Environment

TDM Portal 4.11.98.0 and below for both Windows and Docker.

Resolution

A fix has been provided in TDM Portal 4.11.110.0 for Windows and Docker.

The new release is available for download at the Test Data Manager (TDM) Support Patches page.