Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Multiplying rows

  1. #1

    Default Multiplying rows

    Sorry if this ones a little obvious, I think I should really know the answer but can't work it out. I've written a query that pulls 2 rows from a table and I need to mutilpy the various columns on the top row by their corresponding number on the second row and then dump the result to a second table. But I can't work out how on earth I go about it, I've even tried sperating the rows into seperate queries but still can't work it out. Any pointers?

    Cheers

    Tom

    Oh and I saw aggregate rows was deprecated what are we supposed to use in its place?
    Last edited by bugg_tb; 09-12-2007 at 05:09 AM.

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

    Default

    Easiest probably... make a join in your table so that you get all of the rows in 1 row.

    You could e.g. remember previous values with the javascript step (as an example shows in the userguide) but the problem is that it will try to output the first row as well.

    Regards,
    Sven

  3. #3

    Default

    If I join 2 tables wont it just sum my columns?

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

    Default

    Full outer join with 1 row left and 1 row right will result in 1 row containing all columns (but you have to rename 1 half of course).

    If you have more than 2 rows it becomes trickier.

    Regards,
    Sven

  5. #5

    Default

    Ah cracking idea, cheers Sven

    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.