Incremental Query when offset column is string

asked 2020-06-18 11:15:26 -0500

Jordi gravatar image

Hi, I am trying to make an incremental query on a varchar offset column. There query is like

Select * from TABLE where TO_DATE(OFFSETCOLUMN,'YYYYMMDD') > TO_DATE('${OFFSET}','YYYYMMDD') ORDER BY TO_DATE(OFFSETCOLUMN,'YYYYMMDD')

The query works fine, when I use a jdbc-client and use, e.g., '20190101' as offset. However, in Streamsets I get an errror

Invalid column name: 'offset column'

either when I put OFFSETCOLUMN as offset column or TO_DATE(OFFSETCOLUMN,'YYYYMMDD') as offset column. Any idea?

edit retag flag offensive close merge delete

Comments

Does the same query run successfully directly against your database?

KateF gravatar imageKateF ( 2020-06-22 09:23:37 -0500 )edit

What do you mean by 'directly'? As I said, using a jdbc-client in, e,g, DBVisualizer, the qurey works fine.

Jordi gravatar imageJordi ( 2020-06-23 01:51:46 -0500 )edit