Subject Re: [firebird-support] temporary tables
Author Martijn Tonies
Hi,

> I would like to sort some values inside the body of a stored
> procedure.Those
> values are collected from differed tables . Does the Firebird support
> Temporary tables (visible only inside the user's opened transaction)
> (like
> oracle does)?

No.

> If not , is there some data type (like array ) to use for sorting the
> data

No.

But, if your structure is pretty much always the same, you can
create a table like you normally do and create a generator and
do something like:

(create procedure)
BEGIN
MyGenValue = GEN_ID(myuniquegen, 1);
INSERT INTO myfaketemptable VALUES (MyGenValue, rest)

INSERT INTO myfaketemptable VALUES (MyGenValue, rest)

INSERT INTO myfaketemptable VALUES (MyGenValue, rest)

... do something with the data

DELETE FROM myfaketemptable WHERE UniqueID = MyGenValue;
END


With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com