Update Query

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 |
 
J

John Vinson

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.
 
G

Guest

-----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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Crosstab query totals 3
FUNCTION PREDICTING EVEN/ODD COUNT IN QUERY 1
Count records based on two sorted columns 3
Count and assign 2
Create query 1
creating a query 3
Query Input 1
expesssion in query 4

Top