Append Date Field from table to another table (1 Viewer)

hrdpgajjar

Registered User.
Local time
Tomorrow, 00:11
Joined
Sep 24, 2019
Messages
51
Hi all,

I have created a table with the details below,

Table Name : TPA Data
Column 1 : Registration No
column 2 : Regi. date
column 3 : details sent date

now table-2 details are,

Table Name : Client Details
Column 1 : Registration No (it will be same as TPA data table)
Column 2 : details sent date


Now i need to append "details sent date" field from "Clients Details" table to "details sent date" of "TPA Data" Table.

I've tried doing append query but not succeeded. I am totally new to to append query. Can any one guide me how can I append data from one table to another ?

Note : I need to append only data of same registration no, other data will remail intact.


Thanks
 

Gasman

Enthusiastic Amateur
Local time
Today, 19:41
Joined
Sep 21, 2011
Messages
14,310
So show what you have tried?
An append query will add a record, so you will need at least RegNo as well.
If the record already exists, then you need an Update query using the RegNo as the criteria.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:41
Joined
May 7, 2009
Messages
19,245
why two tables? i don't know.
if you need to Append to table2, use:

insert into [client details] (Column1, Column2) select Column1, Column3 from [TPA Data];

if you only want to append Once, and Update:

UPDATE [Client Details] AS A
RIGHT JOIN [TPA DATA] AS B
ON A.[Registration No] = B.[Registration No]
SET A.[Registration No] = B.[Registration No],
A.[details sent date] = B.[details sent date];
 
Last edited:

hrdpgajjar

Registered User.
Local time
Tomorrow, 00:11
Joined
Sep 24, 2019
Messages
51
So show what you have tried?
An append query will add a record, so you will need at least RegNo as well.
If the record already exists, then you need an Update query using the RegNo as the criteria.
OK thats what i am looking for. will try to use update query and revert back to you. Thanks
 

hrdpgajjar

Registered User.
Local time
Tomorrow, 00:11
Joined
Sep 24, 2019
Messages
51
why two tables? i don't know.
if you need to Append to table2, use:

insert into [client details] (Column1, Column2) select Column1, Column3 from [TPA Data];

if you only want to append Once, and Update:

UPDATE [Client Details] AS A
RIGHT JOIN [TPA DATA] AS B
ON A.[Registration No] = B.[Registration No]
SET A.[Registration No] = B.[Registration No],
A.[details sent date] = B.[details sent date];
two tables because i've already develops database with very very large data in table-1 (i.e. TPA Data) and now I am in need of copy + paste another large data with regi. no and details sent date on daily bases which is not possible for me to do it in my main table. So I've created another table just for copy-paste from excel to access. and then append data to main table for reports and records. I am new in access so dont find another way to do it. Anyways will use ur solution and update you. Thanks for the prompt reply. I found your replies very useful in past also. Cheers!!!
 

hrdpgajjar

Registered User.
Local time
Tomorrow, 00:11
Joined
Sep 24, 2019
Messages
51
So show what you have tried?
An append query will add a record, so you will need at least RegNo as well.
If the record already exists, then you need an Update query using the RegNo as the criteria.
this works for me,

The process of updating data from one table to another follows these broad steps:

  1. Create an update query and add both the source and destination tables to the query.
  2. Join those tables on the fields that contain the related information.
  3. Add the names of your destination fields to the Field row of the query design grid.
  4. Add the names of your source fields to the Update To row of the query design grid by using the following syntax: [source_table].[source_field].


Thanks for the reply.
 

Gasman

Enthusiastic Amateur
Local time
Today, 19:41
Joined
Sep 21, 2011
Messages
14,310
So actually required an Update query and not an Append query.
 

moke123

AWF VIP
Local time
Today, 14:41
Joined
Jan 11, 2013
Messages
3,920
Table Name : TPA Data
Column 1 : Registration No
column 2 : Regi. date
column 3 : details sent date
You should study up on naming conventions. No spaces, no special characters, no reserved words, etc.
 

Users who are viewing this thread

Top Bottom