Re: FIRST and INTO clauses with 7.3 SELECT
Posted in 1999
Paul
Yes, I found this too. SELECT FIRST... will not work with INTO. Informix
7.30.UC8.
Although, since you are using Perl, you could write a cursor to return the first
500 rows. Of course, that would be extra work :-(.
Sujit
Paul Storm <pstorm@pinbot.nit.AirTouch.COM> on 09/16/99 03:25:33 PM
To: informix-list@iiug.org
cc: (bcc: Sujit Pal)
Subject: FIRST and INTO clauses with 7.3 SELECT
Gurus,
I am running IDS 7.30.UC6X1 on Solaris. I was doing some ad hoc queries
in dbaccess. I entered the following SQL,
SELECT first 500 mobile_id, esn, world_number, subscriber_iid
FROM ama_19990901
WHERE mobile_id matches '[2-9]*'
INTO TEMP mytemp;
It balked. It returns an error message "944: Cannot use "first" in this
context."
My 7.3 manual(Feb 98) says that FIRST can be used with a select, as can INTO. I
can also use either one without the other with no problem. However, when used
together this error results. I checked the 7.2 and earlier manuals. There is
no mention of the FIRST clause with SELECT(only FETCH). I usually use PERL for
my code and rarely use SQL, so I'm no expert on SQL releases.
Has anyone seen this? Is this a bug?
Paul Storm