Products | Versions |
---|---|
TIBCO Data Virtualization | All supported versions |
PROCEDURE PaginationSample(IN pageNumber INTEGER, IN pageSize INTEGER, OUT result CURSOR ( ProductName VARCHAR(50), ProductID INTEGER, ProductDescription VARCHAR(255) )) BEGIN DECLARE pageNumber2 INTEGER; DECLARE sqlText LONGVARCHAR; SET pageNumber2 = pageNumber - 1 ; SET sqlText=' SELECT products.ProductName, products.ProductID, products.ProductDescription FROM /shared/examples/ds_inventory/tutorial/products products ORDER BY ProductID OFFSET ' || pageNumber2*pageSize || ' ROWS FETCH FIRST ' || pageSize ||' ROWS ONLY'; OPEN result FOR sqlText ; END
Once this Web Service is published, use the http://localhost:9400/json/paginationws/PaginationSample?pageNumber=1&pageSize=15 url to access the Web Service.
Note: Replace the host , port and published Web Service name as applicable
Note: Use the attached CAR file for reference