Subject Re: temporary tables
Author Alexander V.Nevsky
--- In firebird-support@yahoogroups.com, "petdevis" <devis@i...>
wrote:
> 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)?
> If not , is there some data type (like array ) to use for sorting
the
> data

1. Inside SP:
Select Some_Value
From Table1
Where ...
Union
Select Some_Value
From Table2
Where ...
Union
....
Select Some_Value
From Table1
Where ...
Order By 1

2. Using SP:
Select SomeValue From My_SP(...)
Order By SomeValue

Best regards,
Alexander.