I need to do a SELECT TOP 1 FROM table ORDER BY field ID. I'm working with progress 10.1a.
However, "SELECT TOP x" is not recognize.
Is there a workaround?
Thank's for your help
SELECT TOP n is supported in 10.1B .... not sure when it was introduced, but it hasn't been long. Prior to that, the only workaround was setting the fetch limit, which is a session parameter, not a parameter on an individual SELECT.
Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice http://www.cintegrity.com
thanks for your help, but this solution won't solve my problem.
I will try another approach to do this. could anyone suggest any other to me?
thanks for your help, but this solution won't solvemy problem.I will try another approach to do this. could anyonesuggest any other to me?
thanks for your help, but this solution won't solve
I will try another approach to do this. could anyone
suggest any other to me?
Use the 4GL ... er ABL.
Is there a reason you can't upgrade to 10.1B?
I work in a company of software development, and the DataBase was a choose of our customer. Our customer already used the 10.1B, but they had to come back to use the previous version, 10.1A. I am unaware of the reason.
Well, possibly it would be a thing to ask about. I know of no reason to have to use 10.1A over 10.1B and a great many reasons to use 10.1B over 10.1A ... including TOP. There really isn't any equivalent functionality using SQL prior to TOP. One can adjust fetch limit, as I mentioned, and that has the same effect, but is not terribly convenient unless you are using a tool like Actuate where this can be built into the individual query. For naked SQL, it is a session quality and thus a bit awkward. If you are wrapping the SQL in VB or .NET, perhaps you can adjust the fetch limit there, but that is not something I know about. Likewise, other reporting products might have this capability. But, naked SQL, you need TOP. Period. Perhaps there is something one can do with cursors ... I avoid writing that kind of SQL ... but whatever it is, it will be a kludge which you would want to rip out and replace with TOP the instant you are on 10.1B.