Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: cdf-de - passing multi-select parameter to query

  1. #1
    Join Date
    Jul 2007
    Posts
    1,013

    Default cdf-de - passing multi-select parameter to query

    Greets.

    How do I use a multi-value parameter generated by a multi-select in a SQL query?

    I've tried

    Code:
    select * from products where productcode IN (${prodcodeparam})
    And some other variations, but couldn't find the right one. Adding quotes makes it work when a single value is selected, but it breaks when you choose more than one.

    Cheers!
    (en) Path to Pentaho knowledge: (1:Search the Wiki > 2:Search the Forums > 3:Ask) or (1:Get a Subscription)
    (es) El camino al conocimiento en Pentaho: (1:Buscar en la Wiki > 2:Buscar en los Foros > 3:Preguntar) o (1:Comprar una Subscripción)

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

    Default

    select * from products where productcode IN ('${prodcodeparam}') should work
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3
    Join Date
    Jul 2007
    Posts
    1,013

    Default

    Well, when using that query, if I choose one item the TableComponents gets populated, but nothing is returned if I choose more than one.

    Could it have to do with the parameter's options? In fact, what should the "Property value" field contain?

    Thanks!
    (en) Path to Pentaho knowledge: (1:Search the Wiki > 2:Search the Forums > 3:Ask) or (1:Get a Subscription)
    (es) El camino al conocimiento en Pentaho: (1:Buscar en la Wiki > 2:Buscar en los Foros > 3:Preguntar) o (1:Comprar una Subscripción)

  4. #4
    Join Date
    Nov 2007
    Posts
    21

    Default

    I have the same problem using a PRPT report inside a dashboard. Have you finally get it?

  5. #5
    Join Date
    Feb 2013
    Posts
    5

    Default

    Does anyone know how this: select * from products where productcode IN (${prodcodeparam}) is written in MDX? I can't find a way on how to make a multivalue paramater work in Pentaho CDE using MDX.

  6. #6

    Default

    Hi,
    baby_jee, i have same problem, i dont know how to write parameter in MDX query, if u got it right then let me know..

    Regards,

    - Nirav Maisuriya
    Open Source BI Developer

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.