Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Question about spooling to flat file
Why do you need to create a table? You can spoll your query result to a file directly:
--- spool myFileName select a.field1, b.field2 from table1 a, table2 b where a.field3 = b.field3; spool off -- Hope this helps. Guang In article <8tpqtf$dt7$1_at_nnrp1.deja.com>, joe17836_at_my-deja.com wrote:Received on Wed Nov 01 2000 - 15:56:48 CST
> In article <8tppn6$cp3$1_at_nnrp1.deja.com>,
> joe17836_at_my-deja.com wrote:
> > When spooling the results of a complex join to a flat file, is it
> > faster to do:
> >
> > create table MYTABLE as
> > select a.field1,
> > b.field2
> > from table1 a,
> > table2 b;
> >
> > and then spool MYTABLE to a flat file? Or is it faster to simply do
> > the join (i.e. without doing the create table as) and spool to the
flat
> > file?
> >
> > Thank you in advance.
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> Whoops...obviously forgot my join. But you get the idea...
>
> create table MYTABLE as
> select a.field1,
> b.field2
> from table1 a,
> table2 b
> where a.field3 = b.field3;
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
> Sent via Deja.com http://www.deja.com/ Before you buy.
![]() |
![]() |