Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Insert Statement

Re: Insert Statement

From: Tony R <antonie.rees_at_btinternet.com>
Date: Thu, 28 Aug 2003 23:11:59 +0000 (UTC)
Message-ID: <bim27v$nmt$1@titan.btinternet.com>


Thanks for giving the time to answer this question. I must of had a bad day. The following worked when I got home

insert into b select * from a;

To give a little more detail I am trying a new process to archive a very wide table which has over 200 fields rather than a lot of rows. Also this table is likely to changequite a lot as the business process changes so I wanted to find a quick generic way of duplicating the table without having to loose and rebuild all indeces or any other objects associated with it. Apologies for lack in detail here and thanks once again

Tony

"Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message news:3F4E2FD0.1D64DA47_at_exxesolutions.com...
> Onismus Radebe wrote:
>
> > "Tony Rees" <antonie.rees_at_btinternet.com> wrote in message
> > news:bil326$70m$1$8302bc10_at_news.demon.co.uk...
> > > Thanks for the suggestion. I tried this and it did not work. It came
back
> > > with an ora-00947 Not enough values
> > >
> > > cheers
> > >
> > > Tony
> > >
> > > "sjacek" <member29683_at_dbforums.com> wrote in message
> > > news:3295459.1062077864_at_dbforums.com...
> > > >
> > > > insert into B select * from A;
> > > >
> > > >
> > [snip]
> >
> > Does table A and B have the same structure in particular the same number
of
> > columns? I guess that could be the cause of the problem.
> >
> > --
> > Onismus \|/
> > o o
> >

__________________________________oOO_(_)_OOo______________________________

> >
> > E-Business and Information Management | God said ...
> > Knowledge Discovery & Dissemination | 1. div D = p
> > | 2. curl E = -dB/dt
> > Tel: +27 11 350 3414 | 3. div B = 0
> > Fax: +27 11 350 8585 | 4. curl H = dD/dt
+ J
> > Cel: +27 83 591 5310 | ... and there was light.
> >


>
> Obviously not.
>
> Tony ... if you want help you are going to have to put in some effort. For
> example, give us the table structures.
>
> If as Onismus suggests, and I concur, the two tables don't have the same
> structure you can use NULL or a placehold for missing columns. For
example:
>
> INSERT INTO a
> SELECT field1, field2, NULL, field3, NULL, field4, field5, 'XXX', field6
> FROM b;
>
> --
> Daniel Morgan
> http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
> http://www.outreach.washington.edu/extinfo/certprog/aoa/aoa_main.asp
> damorgan_at_x.washington.edu
> (replace 'x' with a 'u' to reply)
>
>
Received on Thu Aug 28 2003 - 18:11:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US