"TOP" Command in TDV Views

"TOP" Command in TDV Views

book

Article ID: KB0080130

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 7.0.5, 7.0.6,7.0.7, 7.0.8

Description

"TOP" Command in TDV views is not supported and there is already an enhancement request opened for the same(CIS-52376). You will encounter error "FETCH clause can not occur in a saved view" if you use the "TOP" command in TDV views.

As workaround, you can use SQL Script (procedure) to use the "TOP" Command. For Example:

PROCEDURE LookupProduct(OUT result CURSOR(ProductDescription VARCHAR(255)))
    BEGIN
        OPEN result FOR SELECT 
                TOP 5 products.ProductDescription
            FROM /shared/examples/ds_inventory/tutorial/products products;
    END


Other workaround is Package Query. You can create a Package Query to use the TOP command. (Please note that "TOP" command should be supported by the underlying data-source else Package Query won't not work).



 

Issue/Introduction

"TOP" Command in TDV Views