Subject Re: [Firebird-Architect] transient data sets and procedures
Author Ann W. Harrison
Vlad Horsun wrote:
>
> Is this the same thing which i proposed when spoke about DLTT's ?
>
> CREATE PROCEDURE SP (...) RETURNS (...)
> AS
> DECLARE LOCAL TEMPORARY TABLE T1 (
> ID INT NOT NULL PRIMARY KEY,
> VAL VARCHAR(255));
> BEGIN
> ...
> END

Not exactly, but close. The difference is that the transient data set
has a life outside the procedure. It's created with a select statement
- or possibly as Jim suggested with an insert/update/delete - with the
keyword YIELDING followed by the name of the data set. The data set
could be created in the procedure or it could be created by the
application - or another procedure - before the procedure is invoked.

My model would not include constraints (e.g. not null, primary key) on
the declaration - the declaration exists only to give a physical mapping
to a data source that is not defined at the time the procedure is created.