Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Select Values Dependant on other Column Value

  1. #1

    Question Select Values Dependant on other Column Value

    The problem is best described according to following scenario.

    Suppose I have source table with three columns A, B,C

    Now I want to check the column A value if it is 1 then i want to sent the values of Column B and Column C to Destination table otherwise Null or empty.

    How I can achieve this?

    Regards
    Shuja

  2. #2
    Join Date
    Feb 2009
    Posts
    321

    Default

    puffff you have a many ways,

    filter table input--> filter rows--> other step ( java script, add constans with value null, etc)

    other way using sql in the step table input

    and many many ways...

    check the forum...

  3. #3
    Join Date
    Sep 2009
    Posts
    810

    Default

    Hi there,

    Assuming that you're selecting your rows from a db,
    you may also have the option to put a case statement in your SQL select that would empty out the fields based on field A's value.

    Cheers

    Slawo

  4. #4

    Default

    Hi, I am getting values from csv format and i need to enter both type of rows in database which matches and which not. Also let me know how to trim the string from both ends?

    Thanks in advance
    Shuja

  5. #5
    Join Date
    Feb 2009
    Posts
    321

    Default

    I didn't understand what do you need, for trim the string use java script trim('Str') ( this is one way, exists another ways)

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.