Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Current year in a table input

  1. #1
    Join Date
    Feb 2011
    Posts
    240

    Default Current year in a table input

    Hi,

    I want insert the field "current year" in a table input.
    I've used:select DATE_FORMAT(NOW,"%Y") as "anno"......

    but the error (when I click on preview) is: DATA_FORMAT invalid identifie
    Why?
    Thanks
    Mariarita
















  2. #2
    Join Date
    Feb 2008
    Posts
    107

    Default

    It's not a Kettle problem, it's a SQL problem. Try developing your SQL outside of Kettle (e.g. SQL*Plus) and paste it into the table input step once you have verified it's working.

    In this case, the database doesn't understand DATE_FORMAT. NOW also isn't recognised.

    I seem to remember you are using Oracle - please include such info to help us help you in future.

    Are you sure you didn't mean

    TO_CHAR(CURRENT_DATE, 'YYYY')

    ?

    Cheers,
    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.