Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to do incremental queries with TO_DATE-functions?

Hi,

im an trying to build an incremental queries for a JDBC Query Consumer, where the date column is originally a varchar. So the query is like Select TO_DATE("dayofyear"), .... from XY where TO_DATE("dayofyear",'YYYYMMDD') > TO_DATE('${OFFSET}') ORDER BY TO_DATE("dayofyear",'YYYYMMDD')

OFFSET is then 2000-01-01 and offset column dayofyear. However, I get the error "Invalid column name: dayofyear". The query with a '${OFFSET}' = '2020-01-01' works fine. I can also not put TO_DATE("dayofyear",'YYYYMMDD') as offset column.

Any idea what the problem might be?

Thanks

click to hide/show revision 2
None

How to do incremental queries with TO_DATE-functions?

Hi,

im I'm an trying to build an incremental queries for a JDBC Query Consumer, where the date column is originally a varchar. So the query is like Select TO_DATE("dayofyear"), .... from XY where TO_DATE("dayofyear",'YYYYMMDD') > TO_DATE('${OFFSET}') ORDER BY TO_DATE("dayofyear",'YYYYMMDD')

OFFSET is then 2000-01-01 and offset column dayofyear. However, I get the error "Invalid column name: dayofyear". The query with a '${OFFSET}' = '2020-01-01' works fine. I can also not put TO_DATE("dayofyear",'YYYYMMDD') as offset column.

Any idea what the problem might be?

Thanks