Update Query

  • Thread starter Thread starter Stanis
  • Start date Start date
S

Stanis

Hello, i want to make a update query, but i can't. In my
event: i have a query1, with field Name, Number with SUM
for each record from table1, and group by Name and Data
from table1 and criteria Data. I want to update a field
Number from table2, where Number is field Number from
query1, with field Name, Data and Number. For example:
query1 table2
Name |Number| Data Name| Data | Number
stanis | 140 |7 2004 stanis|1/7/04 |
john | 230 |7 2004 stanis|12/8/04 | X
martin | 432 |7 2004 stanis|24/9/04 | X
john |23/7/04 |
john |25/8/04 |
martin|8/7/04 |
martin|12/5/04 |
 
Hello, i want to make a update query, but i can't. In my
event: i have a query1, with field Name, Number with SUM
for each record from table1, and group by Name and Data
from table1 and criteria Data. I want to update a field
Number from table2, where Number is field Number from
query1, with field Name, Data and Number. For example:
query1 table2
Name |Number| Data Name| Data | Number
stanis | 140 |7 2004 stanis|1/7/04 |
john | 230 |7 2004 stanis|12/8/04 | X
martin | 432 |7 2004 stanis|24/9/04 | X
john |23/7/04 |
john |25/8/04 |
martin|8/7/04 |
martin|12/5/04 |

Stanis, I do not understand your example. Why are two records with
Name Stanis updated, and none of the records for John or Martin? How
do you determine which record in Table2 should be updated, and to what
value?

Note that joining two tables (or two queries) on a person's name is
NOT a good idea: names are not unique and may change.
 
-----Original Message-----


Stanis, I do not understand your example. Why are two records with
Name Stanis updated, and none of the records for John or Martin? How
do you determine which record in Table2 should be updated, and to what
value?

Note that joining two tables (or two queries) on a person's name is
NOT a good idea: names are not unique and may change.


.
John i am sorry for my mistake. I have to enter "X" for
each record from table2 in field Number, which reply on
records from query1. I want to update this field with
Number from query1, where i enter criteria for Name and
Data.
 
Back
Top