UPDATE bethadba.FOFILHOS
SET CPF = CASE
WHEN CODI_EMP = 61 AND I_EMPREGADOS = 156 AND i_filhos = 1 THEN '00551366133'
WHEN CODI_EMP = 57 AND I_EMPREGADOS = 290 AND i_filhos = 1 THEN '00636170993'
WHEN CODI_EMP = 61 AND I_EMPREGADOS = 333...
My teacher passed an exercise in which we should use the cases of a switch to handle intervals, he said strictly that we should use the switch and we can not use if nor while/do . I've tried the following code:
switch(saldo)...
I have the following structure tb_bulletin:
|Cod|boletim|dt_enviado|
| 1 | N | NULL |
| 2 | S |24/08/2018|
| 3 | S | NULL |
| 4 | S |23/08/2018|
| 5 | S |23/08/2018|
| 6 | S | NULL |
| 7 | N | NULL |...
I am putting together a proc, but depending on the value of a parameter, I would like the left join to be different.
I have tried the querys below:
This works, however, else as null or even else , if the parameter
COD_...
I'm starting to study programming so, it's a very beginner question.
I tested below to learn about case in Ruby ,
current_time = ARGV.first.to_i
case current_time
when 0..45 then puts('First Haf')
when 46..90 then puts('Second Haf'...
Good evening,
I would like to know if there is a way to declare a 'FOR' within a SWITCH CASE in Java because Netbeans is accusing a bug well in this part. I'm trying to make an application to play a guessing game just like I read on the site...
I am making a query in the database to know in which branch the customer paid a portion and what the normal value and interest that was paid.
The parcel value is transaction 3 in the bank and the interest amount is transaction 59.
Follow t...
I'm doing select with case comparing different statuses of the same field and counting them in separate columns. The problem is that the first column gets NULL until the list of the second ends the count. Then this is reversed.
My quer...
I have to retrieve 2 fields in this query (number of projects and the management that performs such a project). This query is going to be used to generate a report in JASPER and it does not display field with NULL value, so I want to for...
I'm trying to run the following subquery inside a view:
(SELECT
if(idnotas > 0, "não", "sim")
FROM notas WHERE vendas_idvendas = p.vendas_idvendas
ORDER BY idnotas DESC
LIMIT 1
) as primeiraFatura,
Howeve...