1 Reply Latest reply on May 17, 2018 1:24 AM by Robert Whelan

    Dynamic Expression with to_char() and dateformat

    Marvin Mondejar Seasoned Veteran

      Using IDQ Developer, I have a dynamic expression that says:


      iif(is_date(to_char(AllFields)),to_char(AllFields),'n') and it runs fine,


      but when i want to add formatting, its throws and error.


      iif(is_date(to_char(AllFields)),to_char(AllFields,'yyyy-mm-dd hh24miss'),'n')



      [LDTM_0042] The mapping cannot be validated because of the following errors: [The port [Dynamic1] in the transformation [exp_NaturalKeyText_ChecksumPrep0] contains an expression that is not valid. Error: <<PM Parse Error>> [AllFields)),to_char(AllFields,'yyyy-mm-dd hh24miss'),'n')]: invalid symbol reference


      The error is not even pointing to the formatting i added.


      Any ideas?

        • 1. Re: Dynamic Expression with to_char() and dateformat
          Robert Whelan Guru


          The most likely cause is the optimization is modifying the expression in an effort to simplify it and the resulting expression is invalid. Can you go to the Developer UI Window menu -> Preferences -> Informatica -> Run Configurations -> Data Viewer -> Advanced and set Optimizer Level to None.

          Run a Data Preview on the Expression and see if it runs ok.


          Also, what version are you using?