"SELECT FIRST 1" in SPL
Posted in 2011
Topics: Stored Procedures & SPL
The following is a singleton SELECT: "SELECT FIRST 1 blah blah ORDER BY blah blah;" Why is it forbidden in an SPL? Curious, DG
You can do the singleton SELECT if you do not have the ORDER BY clause. If you need the ORDER BY clause then you have to wrap it in a FOREACH:
FOREACH
SELECT FIRST 1 blah blah ORDER BY blah blah
END FOREACH
-----Original Message-----
From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of pretzel
Sent: Wednesday, September 28, 2011 12:42 PM
To: informix-list@iiug.org
Subject: "SELECT FIRST 1" in SPL
The following is a singleton SELECT:
"SELECT FIRST 1 blah blah ORDER BY blah blah;"
Why is it forbidden in an SPL?
Curious,
DG
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
On Wed, Sep 28, 2011 at 10:41, pretzel <davidegrove@gmail.com> wrote: > The following is a singleton SELECT: > > "SELECT FIRST 1 blah blah ORDER BY blah blah;" > > Why is it forbidden in an SPL? > > Curious, > I asked he who knows about such issues, and his response was: It's a bug. Please ask them to open a case... I assume this is not a show-stopper but just a nuisancy discrepancy -- is that fair? That won't stop it being fixed, but may alter its prioritization. You can discuss that with Tech Support when you open the case. -- Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h> Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org "Blessed are we who can laugh at ourselves, for we shall never cease to be amused."
Thank you Joe and Jonathan. Yes, I realized the work-around. I was just being anal and curious, as is my wont. I supposed it might have been a bug that no one ever got around to fixing because there is an easy work around, and, therefore, many other things of greater import. Thanks again. DG