Multiple data Update

  • Thread starter Thread starter James
  • Start date Start date
J

James

I need to update multipe selected records to a new field in the same table
and wonder if it is possible via query window.

What I Have bee doing is

UPDATE tableA.[size01] = [size]
WHERE (((tableA) = 196));

what I need is to add 196,201,215 etc

they are not always in sequence and therefore cannot just say between 196
AND 215

Any tipe or suggestions would be most welcome

James
 
I need to update multipe selected records to a new field in the same table
and wonder if it is possible via query window.

What I Have bee doing is

UPDATE tableA.[size01] = [size]
WHERE (((tableA) = 196));

what I need is to add 196,201,215 etc

they are not always in sequence and therefore cannot just say between 196
AND 215

Any tipe or suggestions would be most welcome

James

If you mean you want to use the *name of the table* itself as a
parameter... you can't, and shouldn't. Storing data in a tablename is
extremely bad design!

Is that what you mean, or are you talking about *a field* in TableA?
 
Hi John,

Sorry it is a field not a table.

I have a stack of data in fields that need to be moved from one field to
another based on the selection criteria in this case its an ID (196, 201,215
etc)

The only way have been able to do this latly is one at a time, which is vert
tidious, hence my request to enter multiple ID's in one selection.

Thanks
James

John Vinson said:
I need to update multipe selected records to a new field in the same table
and wonder if it is possible via query window.

What I Have bee doing is

UPDATE tableA.[size01] = [size]
WHERE (((tableA) = 196));

what I need is to add 196,201,215 etc

they are not always in sequence and therefore cannot just say between 196
AND 215

Any tipe or suggestions would be most welcome

James

If you mean you want to use the *name of the table* itself as a
parameter... you can't, and shouldn't. Storing data in a tablename is
extremely bad design!

Is that what you mean, or are you talking about *a field* in TableA?
 
Hi John,

Sorry it is a field not a table.

I have a stack of data in fields that need to be moved from one field to
another based on the selection criteria in this case its an ID (196, 201,215
etc)

The only way have been able to do this latly is one at a time, which is vert
tidious, hence my request to enter multiple ID's in one selection.

I'm sorry, I still don't understand.

Please post the SQL view of the one ID query that is working. An
Update query can use multiple criteria; and you can update [FieldA] to
[FieldB] by just putting [FieldB] in brackets on the UpdateTo line. Is
this not working for you?
 
p.s.

The SQL would be

UPDATE TableA
SET [Size01] = [Size]
WHERE ID IN (196, 201,215, ...);
 
Back
Top