1
I have a table pessoas
where, I have several fields referring to the person’s registration, One of these fields is the 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 what structure the person belongs to.
I need to update this EST_NUMERO
according to a spreadsheet where I have the number plate.
Below the code I wrote so you 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 the update
, only that I need to enter several number plates there is not only one as I have about 2063 records to update, as I do to put a kind of condition there to pick up all the license plates, something like a and
?
One way would be this:
WHERE PES_NUMERO IN ( A,B,C,D,E,F,G)
– Reginaldo Rigo
Maybe it helps if you put the tag the database you are using.
– Maniero
How will this be done? IE, how are you passing this to the database?
– Marco Souza
So until then I am manually informing in the database, or if I am already typing the license plate Cod manually
– Gustavo Braga
there is another way to bring this to the bank in a more practical way ??
– Gustavo Braga
Is the EST_NUMERO code from the spreadsheet? Or is it fixed?
– Daniel Ferreira
Not this code is fixed the same is contained in another table in this same bank where it is made a specific registration of structure of the company !
– Gustavo Braga