I am trying to update the records in an Oracle SQL database and I can not find the correct sentence.
The EXPENSES table is composed of the following fields:
DATE
TYPE: DATE
REGISTER EXAMPLE: 01/01/2018 12:00
SPENDING
TYPE: NUMBER
REGISTER EXAMPLE: 100
What I need to do is UPDATE the fields that have the minutes = 00, ie (12:00, 1:00, 2:00, etc ...) by X (1 for example) numerical value.
Sentence:
UPDATE GASTOS
SET GASTO = 1
WHERE TO_CHAR(FECHA);
I had researched on the subject and found that the sentence TO_CHAR had to be used, but I always receive an error, of invalid sentence.
Greetings, I am available for any questions.