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?
It does appear that the SQLPreview is the easiest route, although I note that the Argument does work for the top value - just not for the start at.
FYI: I just tested varying the "START AT" value and it's working great for me in PB 2019R3 / PB 2021 with the SA v17 DBMS.
Regards ... Chris
Both of these are major upgrades - retesting and recertifying before deploying on dozens of customers - and we've been dragging our feet somewhat, but need to do it... Thanks for the incentive.