Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Howto add sequence from previous max?

  1. #1
    Join Date
    Jul 2007
    Posts
    2,498

    Question Howto add sequence from previous max?

    Hello

    I'm trying to insert data to a table, but instead of using a sequence from db, I need to read the maximum from the database and start a sequence from that value.

    What should I do? I tried to use a system var in add sequence but w/o success


    thanks
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  2. #2
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    Found a solution: Added a sequence starting on 1, got the max, joined it and made a calculation of (seq + max).

    It's working, but I don't know if its the right way to go
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3
    Join Date
    May 2006
    Posts
    4,882

    Default

    Until http://jira.pentaho.org/browse/PDI-12 is implemented it's probably ok ;-)

    Regards,
    Sven

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.