A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

update blank fields



 
 
Thread Tools Display Modes
  #1  
Old July 7th, 2008, 01:36 PM posted to microsoft.public.access.queries
RA
external usenet poster
 
Posts: 191
Default update blank fields

Hi,

I have two imported tables.

Table1:

CSPC Toolset Month
B3851 AB3851 4/1/2008
B3853 AB3851
B4852 AB4852 4/10/2008
B4853 AB4852


Table2 :

CSPC Toolset Month
B3851 AB3851 4/1/2008
B4852 AB4852 4/10/2008

I need to update the field assigned to Month from Table1 to the dates
assigned in Table2.
Note that for the same Toolset field in Table1 I have two CSPCs (Toolset
AB3851 shows two CSPC – B3851 and B3853). I am looking for the second CSPC
Table1 to get updated with the same Month date from Table2.

Any suggestions greatly appreciated.

Thank you,


  #2  
Old July 7th, 2008, 04:06 PM posted to microsoft.public.access.queries
[email protected]
external usenet poster
 
Posts: 744
Default update blank fields

On Jul 7, 7:36*am, Ra wrote:
Hi,

I have two imported tables.

Table1:

CSPC * * * * * *Toolset * * * * Month
B3851 * * * * * AB3851 * * * * * * * * *4/1/2008
B3853 * * * * * AB3851
B4852 * * * * * AB4852 * * * * * * * * *4/10/2008
B4853 * * * * * AB4852

Table2 :

CSPC * * * * * *Toolset * * * * Month
B3851 * * * * * AB3851 * * * * * * * * *4/1/2008
B4852 * * * * * AB4852 * * * * * * * * *4/10/2008

I need to update the field assigned to Month from Table1 to the dates
assigned in Table2.
Note that for the same Toolset field in Table1 I have two CSPCs (Toolset
AB3851 shows two CSPC – B3851 and B3853). *I am looking for the second CSPC
Table1 to get updated with the same Month date from Table2.

Any suggestions greatly appreciated.

Thank you,


use an update query. join on ToolSet and Month, and filter for CSPC
IS NULL.
  #3  
Old July 7th, 2008, 04:13 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default update blank fields

UPDATE Table1
INNER JOIN Table2
ON Table1.Toolset = Table2.Toolset
SET Table1.[Month] = Table2.[Month]
WHERE Table1.[Month] Is Null;
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Ra" wrote:

Hi,

I have two imported tables.

Table1:

CSPC Toolset Month
B3851 AB3851 4/1/2008
B3853 AB3851
B4852 AB4852 4/10/2008
B4853 AB4852


Table2 :

CSPC Toolset Month
B3851 AB3851 4/1/2008
B4852 AB4852 4/10/2008

I need to update the field assigned to Month from Table1 to the dates
assigned in Table2.
Note that for the same Toolset field in Table1 I have two CSPCs (Toolset
AB3851 shows two CSPC – B3851 and B3853). I am looking for the second CSPC
Table1 to get updated with the same Month date from Table2.

Any suggestions greatly appreciated.

Thank you,


  #4  
Old July 10th, 2008, 11:57 AM posted to microsoft.public.access.queries
RA
external usenet poster
 
Posts: 191
Default update blank fields

Thank you very much..it's working !

"Jerry Whittle" wrote:

UPDATE Table1
INNER JOIN Table2
ON Table1.Toolset = Table2.Toolset
SET Table1.[Month] = Table2.[Month]
WHERE Table1.[Month] Is Null;
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Ra" wrote:

Hi,

I have two imported tables.

Table1:

CSPC Toolset Month
B3851 AB3851 4/1/2008
B3853 AB3851
B4852 AB4852 4/10/2008
B4853 AB4852


Table2 :

CSPC Toolset Month
B3851 AB3851 4/1/2008
B4852 AB4852 4/10/2008

I need to update the field assigned to Month from Table1 to the dates
assigned in Table2.
Note that for the same Toolset field in Table1 I have two CSPCs (Toolset
AB3851 shows two CSPC – B3851 and B3853). I am looking for the second CSPC
Table1 to get updated with the same Month date from Table2.

Any suggestions greatly appreciated.

Thank you,


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.