Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!in.100proofnews.com!in.100proofnews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!nntp.giganews.com!newspeer.monmouth.com!newsfeed.mathworks.com!lon-transit.news.telstra.net!ken-transit.news.telstra.net!news.telstra.net!news-server.bigpond.net.au!53ab2750!not-for-mail
From: "Douglas Hawthorne" <douglashawthorne@yahoo.com.au>
Newsgroups: comp.databases.oracle.misc
References: <20040328164400.01536.00000287@mb-m15.aol.com>
Subject: Re: partitioned data
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <YBI9c.128873$Wa.63429@news-server.bigpond.net.au>
Date: Sun, 28 Mar 2004 22:47:20 GMT
NNTP-Posting-Host: 138.130.83.82
X-Complaints-To: abuse@bigpond.net.au
X-Trace: news-server.bigpond.net.au 1080514040 138.130.83.82 (Mon, 29 Mar 2004 08:47:20 EST)
NNTP-Posting-Date: Mon, 29 Mar 2004 08:47:20 EST
Organization: BigPond Internet Services
Xref: newssvr20.news.prodigy.com comp.databases.oracle.misc:137191

"Cupofjava1961" <cupofjava1961@aol.com> wrote in message
news:20040328164400.01536.00000287@mb-m15.aol.com...
> I need some help with the following command:
>
> alter table sales_detail_data exchange partition sales_q1_99
>
> with table sales_quarter_99 excluding indexes;
>
> My question is am I moving data from the partition sales_q1_99
> into the table sales_quarter_99
> or
> am I moving the data in the table sales_quarter_99
> into the partition sales_q1_99 ?
> In which direction does this command work?
>
> Thanks in advance.

Hi,

The answer is that data is moved in both directions.  The data in the
partition will end up in the table and the data in the table will end up in
the partition.  See p.11-81 of "Oracle 9i SQL Reference" for details.  See
p.11-95 for an example.

See also "regular table to partition table" at
http://asktom.oracle.com/pls/ask/f?p=4950:8:3455899164043960561::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:5532451667350,
This example shows how to create an empty partition, and exchange that
partition with a table of new data as a 'quick' way of adding new data to a
partitioned table.  In effect, this example move data in one direction only.

Douglas Hawthorne


