Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
talendtester
Creator III
Creator III

tOracleRow - Insert case statement to cast timestamp?

I have an Oracle database table with datetime values stored in a VARCHAR column.

Some of the rows of data have null for the RECORD_START_TIME.

I am attempting to insert into a table with a TIMESTAMP(0) column.

 

This SQL runs fine outside of Talend DI, but it errors when I try running it in the tOracleRow component.

 

begin
execute immediate 'INSERT /*+ append parallel (8) */   INTO myDatabase.myTable
SELECT
 CASE WHEN RECORD_START_TIME is null THEN null ELSE to_timestamp( RECORD_START_TIME,''yyyy-mm-dd HH24:MI:ss'' ) END  as  RECORD_START_TIME
FROM myDatabase.myOtherTable';
execute immediate 'commit';
end;

 

The error is:

ORA-01830: date format picture ends before converting entire input string

Labels (1)
2 Replies
talendtester
Creator III
Creator III
Author

Anyone have any ideas on how to make this insert statement work in Talend DI?

talendtester
Creator III
Creator III
Author

Still hoping someone can help with an answer...