Personally I agree that it would be nicer not to return an error, and a
quick look at the code suggests it would be a small change to just
return the column names and (0 rows) output.
If I've read the code correctly it does seem as if Ingres will return
the expected error if the 'n' of 'first n' is a variable (via a
database procedure seems to be one option) that evaluates to 0 or less.
In such a case the error is:
E_US0874 Invalid fetch first n rows value. It must be a positive
integer.
(Wed Apr 28 08:19:10 2010)
If this is the case, then that might make the case for not returning an
error for the 'select first 0' where 0 is a constant less persuasive.
-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Roy
Hann
Sent: 27 April 2010 18:43
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] select first 0
Kevin Smedley wrote:
Quote:
It wouldn't be hard to change the behaviour of select first 0 to
return
an error message. |
I don't feel that SELECT FIRST 0... is an error. It should do what
Marty's programmer expected.
What do other DBMSs do? (I don't have anything else running at the
moment.)
--
Roy
UK Ingres User Association Conference 2010 will be on Tuesday June 8
2010
Go to http://www.iua.org.uk/join to get on the mailing list.
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://ext-cando.kettleriverconsulti...fo/info-ingres