How to have distinct keyword in the rulebase construct when using table source="sql" or table source="datasource" to select distinct values from the source?

How to have distinct keyword in the rulebase construct when using table source="sql" or table source="datasource" to select distinct values from the source?

book

Article ID: KB0091455

calendar_today

Updated On:

Products Versions
TIBCO Collaborative Information Manager -
Not Applicable -

Description

Resolution:
Use the distinct keyword as &lttable source="sql" distinct="true"> as follows:
       &ltaction>
             &ltselect order="1" novalue="default" distinct="true">
                    &lttable source="sql">
                        &ltliteral&gtCategory_Lookup/CategoryLevel2</literal>
                        &ltwhere>
                              &ltsql>
                                    &lteq>                                                                    
                                           &ltliteral&gtCategory_Lookup/CategoryLevel1</literal>
                                           &ltvar&gtProductCategory1</var>
                                    </eq>
                              </sql>
                </where>
                     </table>
              </select>
       </action>

Issue/Introduction

How to have distinct keyword in the rulebase construct when using table source="sql" or table source="datasource" to select distinct values from the source?