I have a table pessoas
where, I have several fields referring to the person's registry, One of these fields is PES_NUMERO
, which is nothing more than the code of the person in the system, well, I have another field called EST_NUMERO
, where I inform which structure the person belongs to.
I need to update this EST_NUMERO
according to a worksheet where I have the license plate number.
Below the code I wrote so they can understand better
USE RBACESSO_V100
GO
UPDATE PESSOAS
SET EST_NUMERO = 100 -- Numero do código da estrutura que a pessoa deve receber.
WHERE PES_NUMERO = 1222244 -- Numero da matricula da pessoa a ser atualizada.
The command WHERE
I inform the condition for update
, only that I need to inform there several numbers of enrollment is not only one because I have about 2063 records to update, how do I put a kind of condition there to get all the registrations, something like a and
?