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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

can anyone help me with this query?

 

after running job it gives error like unparseble date

context.Query_string="select date_key,inc_date from date_dim where inc_date >'" +TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("dd-MM-yyyy",context.Last_Loaded_Date))+"'and inc_date < now()";

Labels (1)
  • v6.x

1 Solution

Accepted Solutions
vapukov
Master II
Master II

context.Query_string="select date_key,inc_date from date_dim where inc_date >'" +TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("dd-MM-yyyy",context.Last_Loaded_Date))+"'and inc_date < now()";

missed space

context.Query_string="select date_key,inc_date from date_dim where inc_date >'" +TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("dd-MM-yyyy",context.Last_Loaded_Date))+"'SPACE_MUST_BE_THERE and inc_date < now()";

View solution in original post

3 Replies
TRF
Champion II
Champion II

As your date value is enclosed between '' you probably need to use a SQL conversion fonction such as to_date.
Did you try this:
context.Query_string="select date_key,inc_date from date_dim where inc_date > to_date('" +TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("dd-MM-yyyy",context.Last_Loaded_Date))+"') and inc_date < now()"
vapukov
Master II
Master II

context.Query_string="select date_key,inc_date from date_dim where inc_date >'" +TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("dd-MM-yyyy",context.Last_Loaded_Date))+"'and inc_date < now()";

missed space

context.Query_string="select date_key,inc_date from date_dim where inc_date >'" +TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("dd-MM-yyyy",context.Last_Loaded_Date))+"'SPACE_MUST_BE_THERE and inc_date < now()";
Anonymous
Not applicable
Author

i will try it.