0
votes

I keep getting the following error when trying to execute the following WHERE condition but can't quite figure out what the actual problem is... any help is appreciated. Thanks!

WHERE ((CUSTOMER.CREATE_DATE >= TO_DATE($$EXTRACT_DT,'YYYYMMDD')) OR
(CUSTOMER.UPDATE_DATE >= TO_DATE($$EXTRACT_DT,'YYYYMMDD')))

NOTE: Would like to add that when I remove the WHERE condition, the query executes without any issues.

2
The parens balance, the problem might be somewhere else. - Gordon Linoff
So what is $$EXTRACT_DATE? Some kind of parameter notation? - APC
@APC Yes, that's an Informatica parameter notation. - Bill the Lizard

2 Answers

2
votes

Your parens balance -- 5 ( and 5 ). I would write the code to make this obvious:

WHERE (CUSTOMER.CREATE_DATE >= TO_DATE($$EXTRACT_DT, 'YYYYMMDD') OR
       CUSTOMER.UPDATE_DATE >= TO_DATE($$EXTRACT_DT, 'YYYYMMDD')
      )

(This removes the parentheses on each clause.)

Hence, your problem would appear to be elsewhere in the query.

0
votes

Try this:

WHERE (CUSTOMER.CREATE_DATE >= TO_DATE("$$EXTRACT_DT", 'YYYYMMDD') OR
       CUSTOMER.UPDATE_DATE >= TO_DATE("$$EXTRACT_DT", 'YYYYMMDD')
      )