Clarity

  • 1.  Multiselect option in NSQL query

    Posted Feb 26, 2016 08:16 AM

    Hi Team,

     

    I need to include a multi select parameter in NSQL query. I have a parameter that's single select for timeperiod. I want to this to be multi select. One way we can achieve is  that

    make timeperiod as attribute. But with portlet design reasons I am getting duplicate dimensions issue and so they cannot add the element in the select statement.egar

    Is there any way we can do this?

     

    Regards,

     

    Arun



  • 2.  Re: Multiselect option in NSQL query

    Broadcom Employee
    Posted Feb 26, 2016 08:21 AM

    Hi Arun,

     

    See this thread Multi-select on an NSQL Parameter?

     

    Regards

    Suman Pramanik



  • 3.  Re: Multiselect option in NSQL query

    Posted Feb 26, 2016 08:25 AM

    ...or just fix the duplicate dimension problem?



  • 4.  Re: Multiselect option in NSQL query

    Posted Feb 26, 2016 08:28 AM

    Dave,

     

    But the results doesn't seem to be fine. I am getting duplicates in the resultset.



  • 5.  Re: Multiselect option in NSQL query

    Posted Feb 26, 2016 08:36 AM

    When you get the duplicate dimension message then that often means the portlet has "dropped" rows returned from the query - the rows it has dropped are the ones that share a dimension with one of the rows that it has not dropped. To fix this, you just need to code the NSQL so that the dimension that you have defined will always be unique across the returned dataset - the message will then go away and you will see all the data that the query delivers.

     

    (in Oracle you can use ROWNUM as the dimension to ensure it is unique)

     

    [ You are doing the right thing by making the field that you want to multi-select upon one of the returned attributes ]



  • 6.  Re: Multiselect option in NSQL query

    Posted Feb 26, 2016 09:16 AM

    Dave,

     

    I have 2 union all in the nsql query.So I want the Timeperiod parameter to be passed only in first part of the union. Also If I bring the time period in returned attribute the second union will produce zero rows as it is not part of second union.



  • 7.  Re: Multiselect option in NSQL query

    Posted Feb 26, 2016 09:21 AM

    I would expect that you would just provide a dummy value for the attribute in the second query.

     

    But I think you are saying that you want your second query to ignore the filter values and always return data? Thats not the way queries work so you are not going to be able to do that and have a multi-select parameter (unless you can follow and add to the conversation that Rob&I were having in the thread Suman linked to) - so probably need to redesign your "requirements".



  • 8.  Re: Multiselect option in NSQL query

    Posted Feb 26, 2016 08:25 AM

    Suman,

     

    I read that post .But I did not find the answers in that . Also the image is missing in the post.

    Is there any way we can achieve this?