Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is there any equivalent of Sql Server's temporary table in Oracle
You could write the temporary table queries as virtual tables, but you are
better off rewriting the queries. The Oracle query would reverse the logic
of the code and matching the parens would drive you nuts.
Something like the following.
MS
select ... into #T1 from T1, T2,...
select ... into #T2 from #T1, T3,...
...
select ... into #Tn from #Tn-1, Tm
select ... from #Tn
Oracle
select ...
from (
select ...
from Tm-1, (
select ...
from Tm-2, (
...
select ...
from T2, (
select ...
from T1
))...))
"Galen Boyer" <galenboyer_at_hotpop.com> wrote in message
news:uof8071b6.fsf_at_standardandpoors.com...
> On Thu, 05 Dec 2002, gamaz_at_eathlink.net wrote:
> > Hi, In sql server, some of the stored procedures I handled
> > using temporary tables. The idea was to make joins simplified
> > specially when there are six to eight table joins involed in
> > data extraction. Those can are broken up in steps using
> > temporary tables. I was wondering, what would be equivalent
> > concept to handle joins of six to eight tables to extract data
> > in Oracle. I know it is possible do crude lengthy joins, but I
> > am sure there would be an elegant way to handle the same. Any
> > insight/advise/link to knowledge site is appreciated in
> > advance. Regards
>
> Let Oracle do the temporary set building. You code the join.
> --
> Galen Boyer
Received on Fri Dec 06 2002 - 08:36:53 CST