Pasting data into specific columns.

  • Thread starter Thread starter Mario
  • Start date Start date
M

Mario

Lets say following is the data sheet view of my
table "temp"

|col1 |col2 |col3
---------------------------------
|
---------------------------------

I have copied a 5(rows)x1(col) data from excel. Is there
a way to paste that data into col 3 of my table "temp".

Thanks
Mario
 
Sure, just select the "col3" heading, so that it turns black along with the "cell" for the
first record. Then right-click your mouse and left-click paste on the shortcut menu, or
click on Edit > Paste using the regular menu. This should work as long as the table is a
base table (ie. there are no other tables that are "parent" to this table) and one of the
following three conditions is met:

1.) You have an autonumber primary key, which will automatically populate as new records
are added.
2.) Col3 is your primary key, and the data you are pasting is unique for each record or
3.) Your table doesn't have a primary key yet.

If your table is not a base table (for example, the Products table in the Northwind sample
database is not a base table, because the Categories and Suppliers tables are parent to
this table) then this will not work if you are using a combined field primary key, unless
each foreign key field is populated first. Basically, you can paste as long as the result
would not attempt to create unknown values in a primary key field, since a PK cannot be
null and must be unique in value.

Tom
_____________________________________


Lets say following is the data sheet view of my
table "temp"

|col1 |col2 |col3
---------------------------------
|
---------------------------------

I have copied a 5(rows)x1(col) data from excel. Is there
a way to paste that data into col 3 of my table "temp".

Thanks
Mario
 
Back
Top