Re: Data Transfer.

From: Brian W. Chester <bwchester_at_home.com>
Date: Sat, 06 Nov 1999 14:00:11 GMT
Message-ID: <LvWU3.880$Zu4.20844_at_news1.rdc1.mb.home.com>


Andy,

Provided the fields are similar you can do something like,

INSERT INTO schema.table1 (emp_no, ref_no)

    SELECT emp_no, ref_no

        FROM table2
     WHERE  (some condition);

If the condition is actually on the first table (receiving table) then try this,

INSERT INTO (SELECT emp_no, ref_no FROM table1

                            WHERE condition)
    SELECT emp_no, ref_no FROM table2
        WHERE condition;

These statement are from memory which may not be correct but give them a try.

Brian

Andy Longworth wrote in message <38144C3F.CD5DB759_at_hp.com>...
>If I had two tables both containing the same fields, eg emp_no and
>ref_no. Is it possible to transfer data fitting certain criteria from
>one table to another?
>--
>
>Mail to : Andy_Longworth_at_bigfoot.com
Received on Sat Nov 06 1999 - 15:00:11 CET

Original text of this message