Subject | Re: [firebird-support] temporary tables |
---|---|
Author | Martijn Tonies |
Post date | 2004-01-27T15:15:20Z |
Hi,
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
> I would like to sort some values inside the body of a storedNo.
> 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)?
> If not , is there some data type (like array ) to use for sorting theNo.
> data
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