Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Oracle year

  1. #1
    Join Date
    Feb 2011
    Posts
    240

    Default Oracle year

    Hi,

    I've a table and a field of this table is "anno".

    I must create this transformation:

    if anno = anno_elab then .... else ...

    where "anno_elab" is to_number(to_char(sysdate, 'YYYY'))

    My problem is: how do I insert "anno_elab" into transformation?

    Thanks

    Mariarita

  2. #2
    Join Date
    Dec 2009
    Posts
    609

    Default

    Hi,

    not sure what you mean... you can write this expression into any SQL statement...
    then use Filter or Modified JavaScript or Calculator Step to do your "if then else" Stuff...

    Cheers,

    Tom

  3. #3
    Join Date
    Feb 2011
    Posts
    240

    Default

    my problem is how to define the new "anno_elab"

  4. #4
    Join Date
    Feb 2011
    Posts
    240

    Default

    Maybe can I use a Filter row and the condition will be anno_elab = to_number(to_char(sysdate, 'YYYY'))?

  5. #5
    Join Date
    Feb 2011
    Posts
    240

    Default

    sorry the condition will be anno = to_number(to_char(sysdate, 'YYYY'))

  6. #6
    Join Date
    Dec 2009
    Posts
    609

    Default

    Hi,

    use the Calculator Step... there should be an operation available to obtain the current year value which you can then use later on in your transformation.

    Cheers,

    Tom

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.