# Revision history [back]

### 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

 2 None jeff 3097 ●17 ●41 ●70

### 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