Replace the value of one fields in a Table

Replace the value of one fields in a Table

Post by Vic Sergean » Wed, 29 Jan 2003 19:54:35



Hi,

Cane anybody inform me, if there is a way to replace a
field of all records in a recordset to the same value
(reset to 0 for example). For preference in one
instruction, instead of looping the full recordset and
change each record with a update command record by
record, because there are a lot of records.

Many thanks
Best Regards,

Vic

 
 
 

Replace the value of one fields in a Table

Post by Val Mazu » Wed, 29 Jan 2003 22:03:19


Vic,

It is simple UPDATE SQL statement

UPDATE MyTable SET FieldName=0

it will set FieldName to 0 in all records of MyTable

--
Val Mazur
Microsoft MVP


Quote:> Hi,

> Cane anybody inform me, if there is a way to replace a
> field of all records in a recordset to the same value
> (reset to 0 for example). For preference in one
> instruction, instead of looping the full recordset and
> change each record with a update command record by
> record, because there are a lot of records.

> Many thanks
> Best Regards,

> Vic