Subject RE: [firebird-support] INSERT INTO SELECT only inserts one row
Author Rick Debay
> Yes. And yes, it violates the standard, and yes, sooner or later it
will get fixed,
> but absent serious funding, the time scale is years rather than
months.

Is it very difficult to fix? I would think that a syntatically correct
statement that returns incorrect results would be a priority.

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Ann W. Harrison
Sent: Friday, May 20, 2005 5:26 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] INSERT INTO SELECT only inserts one row

Rick Debay wrote:

> The only thing I can think of is that the WHERE statement is being
> reevaluated when each row is returned, resulting in no results after
> the first row is inserted into INVC_GRANTEE_INVT.
> Is this what is happening?

Yes. And yes, it violates the standard, and yes, sooner or later it
will get fixed, but absent serious funding, the time scale is years
rather than months.

> Is there any way around it besides using a stored procedure and
> performing an initial select in order to get the MAX to pass to the
> INSERT INTO SELECT?

I'd go with the stored procedure, worry about anything that requires
regular fetching of the MAX of whatever, and be sure to use aliases when
creating even vaguely recursive requests.


Regards,


Ann



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item on
the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links