I was able to append the information from three tables into one table. I
noticed however that some of the information from the columns did not
append properly.  If the destination col is not wide enough for the
appended info, does it not append at all?  Is there a setting that would
truncate it so at least most of it gets into the table?

Jim

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A.
Razzak Memon
Sent: Friday, March 13, 2009 9:38 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: append table

At 10:17 AM 3/13/2009, Jim Belisle wrote:

>I have built a temporary table that will eventually be used to
>import information into a permanent table. I will be importing
>(or appending, inserting) into the temp table, info contained
>in a table created from outside info where the fields are all
>note fields. This table is already in the database. I will only
>be using certain fields to go into the temp table.  Here is the
>question.  Since I will have more fields in the temp table than
>the number of fields I will insert, what is the best method for
>doing this?


Jim,

In general, when using the APPEND command, R:BASE only copies
values from the source table or view that have matching column
names in the destination table. Columns in the destination
table that are not in the source table or view are filled with
NULL values. Rows are copied, not removed, from the source.

On the other hand, using the INSERT command, the columns taken
from the temp table can have different column names, the data
types must be the same, and the order and number of columns
in the column list of the source table (designated by SELECT)
must match the column list of the destination table (designated
by INTO).

Example:

INSERT INTO Customer (Company, CustPhone) +
SELECT cname, phone FROM temptablename WHERE ...

Last but not least, when APPENDing or INSERTing rows, all
rules and table constraints are enforced.

Very Best R:egards,

Razzak.


Reply via email to