Subject | Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2018-05-03T21:17:05Z |
03.05.2018 23:04, blackfalconsoftware@... [firebird-support] wrote:
Watch this in isql:
SQL> set term GO;
SQL> EXECUTE BLOCK RETURNS (A INTEGER)
CON> AS
CON> begin
CON> a = 1;
CON> SUSPEND; -- return a record containing 1
CON> a = 2;
CON> SUSPEND; -- return a record containing 2
CON> SUSPEND; -- return another record containing 2
CON> end
CON> GO
A
============
1
2
2
--
WBR, SD.
> However, I though only the issuance one "SUSPEND" was enough to flush the entire buffer ofNo. One SUSPEND - one record in result set. Two SUSPENDs - two records and so on.
> all records...
Watch this in isql:
SQL> set term GO;
SQL> EXECUTE BLOCK RETURNS (A INTEGER)
CON> AS
CON> begin
CON> a = 1;
CON> SUSPEND; -- return a record containing 1
CON> a = 2;
CON> SUSPEND; -- return a record containing 2
CON> SUSPEND; -- return another record containing 2
CON> end
CON> GO
A
============
1
2
2
--
WBR, SD.