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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
NagarajDonthula
Contributor
Contributor

Parametrize LastModified Date and Timestamp to compare against with Source DB Modified Date

Hi Team -

My Source is Oracle (Timestamp6) format. So while extracting the data in query i'm using as -   to_char(last_modified,'yyyymmddhh24missFF') as

ast_modified

but in my where condition if i hardcode the timestamp value where

ast_modified

< to_timestamp('20150325104738000000', 'yyyymmddhh24missFF') .

I have created context variable and global set variable to parametrize the 20150325104738000000 value but i'm getting error. Could you please help about the sytax.

For my incremental process i will pull as is but where as for my incremental process i will capture the last run date and timestamp and compare against with source DB.

Labels (4)
2 Replies
gjeremy1617088143
Master
Master

Hi could you send the error message ? it seems you try to compare char and timestamp, both values will have the same data type if you want to compare them .

Send me Love and Kudos

NagarajDonthula
Contributor
Contributor
Author

Yes I Agree. Source is (Oracle Timestamp6).

 

Last Run Date I'm capturing as yyyymmddhh24missFF equivalent if Oracle in Context variable as 20150325104738000000 (Example we can consider as Last_modifed date . In where condition last_modified < to_timestamp('20150325104738000000', 'yyyymmddhh24missFF') is working without any issue if we hardcode the value.

Through paramterization where last.lastmod < to_date('context.last_run_date', 'yyyymmddhh24missFF' )" -- Error Msg = ORA-01841: (full) year must be between -4713 and +9999, and not be 0