Page 1 of 1

Help needed on insert

PostPosted: Mon Apr 14, 2008 9:09 pm
by pcdoctor
I have a Table say Table A..I need to copy the records of this table into another Table B using a single insert..Both tables have same no.of columns and of same data type..Is it possible using a single insert to pick up data from table A and copy it in table B??Plz provide some suggestions as to how this could be implemented..

Re: Help needed on insert

PostPosted: Mon Apr 14, 2008 9:56 pm
by CICS Guy
pcdoctor wrote:I have a Table say Table A..I need to copy the records of this table into another Table B using a single insert..Both tables have same no.of columns and of same data type..Is it possible using a single insert to pick up data from table A and copy it in table B??Plz provide some suggestions as to how this could be implemented..
It looks like it, take a look at the INSERT and
fullselect - The number of columns in the result table must be equal to the number of names in the column list and the columns that are identified in the INCLUDE clause. The value of the first column of the result is inserted in the first column in the list, the second value in the second column, and so on.

Re: Help needed on insert

PostPosted: Mon Apr 14, 2008 10:16 pm
by pcdoctor
Hey Cics guy iam very much thankful to u..Insert with select matches my exact need..!!!