Update query help

  • Thread starter Thread starter Lapchien
  • Start date Start date
L

Lapchien

I'd like to update some of the fields in a table 'master', where some of the
data in a row already exists. For example, I'd like to add to a record in
the 'master' table -

The value of an order
The number of the engineer who carried out the work
The date the job was completed

Fields for these values already exist.

All these 'additional' records exist in another table called 'update'.

Obviously these things are not known when the original record is created in
the 'master' table.

Looked everywhere for an answer but not quite there...

Thanks
 
Sorry guys - managed to do a reality check, and got it to work using:

UPDATE [master] INNER JOIN New ON [master].[job number] = New.[job number]
SET [master].[Engineer number] = New.engineer_code;

Thanks
 
Lapchien said:
I'd like to update some of the fields in a table 'master', where some of the
data in a row already exists. For example, I'd like to add to a record in
the 'master' table -

The value of an order
The number of the engineer who carried out the work
The date the job was completed

Fields for these values already exist.

Lapchien,

the fields exist the moment you create the table. The question is if
the _records_ exist and you want to update (= overwrite) the values of
certain fields? It is not very clear because you also write 'I'd like
to add a record'.
All these 'additional' records exist in another table called 'update'.

If you have to update some fields in existing records in the master
table, how can the corresponding records be identified? I.e. how do
you which record from 'update' to associate with which record in
'master'? Do you have a unique record identifier in the 'update'
table?

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
Back
Top