- Glenn Barber
- PowerBuilder
- Monday, 21 June 2021 08:14 PM UTC
In PB 2017 we have an SQL statement that can potentially retrieve too many rows to be manageable.
We would like to limit the retrieve to a specified number of rows and use the SQL START AT syntax to say where to start based on the order by
The datawindow SQL
SELECT TOP 1000 START AT 1000
propasset.propassetid,..
works to give us a Thousand rows starting at row 1001 in the collation sequence
we can even pass a retrieval argument :topno to specify the number of rows
SELECT TOP :topno START AT 1000
propasset.propassetid,..
However if we attempt to use a retrieval argument for the START AT value
SELECT TOP :topno START AT :startatno
we get the following message from the Datawindow SQL Checker (SQL Anywhere)
SQLSTATE = 42000
[Sybase][ODBC Driver][SQL Anywhere]Statements' Size Limit is Invalid
Does anyone know how we can use a retrieval argument to handle the START AT value?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.