The source and destination must have the same schema so if the two queries
are the same then

     insert into table select * from query  blah blah

will work fine - maybe (depends on db type, autoinc/identity/timestamp cols
etc.)

If not then you need to

     insert into table (field list) select matchingfieldlist from query
blah blah






Mark Derricutt <[EMAIL PROTECTED]> on 15/03/99 09:15:11

Please respond to [EMAIL PROTECTED]

To:   Multiple recipients of list delphi <[EMAIL PROTECTED]>
cc:    (bcc: Peter Jones/Logistics&Information
      Technology/Christchurch/Foodstuffs)
Subject:  [DUG]:  SQL Query...




Is it possible to do an "insert into" query and supply a series of
values from a "select from" query?

I want to do something like:

  insert into sometable values {
    select * from someothertable where id = 2 }

???
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz






---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to