SUB-Query : only one record as result wanter
18 October, 2014
(Yellowfin 7.1, Build september 2014)
Is it possible to force a subquery to retrieve only one (1) record, like the Select "top 1 * from table" in a SQL-statement?
Reason:
We use the SUB-Query function to check if a certain "productlabel" belongs or not belongs to a specific organisation. While "productlabels" are sold it is possible that one or more organisations have more the one entry in the table that is queried with this SUB-Query. The effect can be that based on that relation more then 1 entry of this productlabel will appear in the data-section on the basic report. With a "top 1 *" this could be restricted to only 1 item.
Is it possible to force a subquery to retrieve only one (1) record, like the Select "top 1 * from table" in a SQL-statement?
Reason:
We use the SUB-Query function to check if a certain "productlabel" belongs or not belongs to a specific organisation. While "productlabels" are sold it is possible that one or more organisations have more the one entry in the table that is queried with this SUB-Query. The effect can be that based on that relation more then 1 entry of this productlabel will appear in the data-section on the basic report. With a "top 1 *" this could be restricted to only 1 item.
Hi Peter,
It is certainly possible to use the Top N Advanced Function in a Yellowfin sub-query, however, I suspect you would have tried that, which makes me wonder if I have misunderstood the scenario. In which case I wonder if the Sub-query function's Duplicate Records option is perhaps what you are looking for to restrict duplication of the productlabel.
regards,
Dave
It is certainly possible to use the Top N Advanced Function in a Yellowfin sub-query, however, I suspect you would have tried that, which makes me wonder if I have misunderstood the scenario. In which case I wonder if the Sub-query function's Duplicate Records option is perhaps what you are looking for to restrict duplication of the productlabel.
regards,
Dave