Posts by Germano Buss Niehues • 795 points
42 posts
-
0
votes1
answer19
viewsA: How to consume API in Vue to condition a route
turns its function into asynchronous, and waits for its return for example: { path: 'clientes/', name: 'cadastrar', component: await async () => { const existe = informação da api; if (!existe) {…
-
2
votes1
answer49
viewsA: How to add a field of objects returned from firebase ( vuejs + firebase )
Using javascript you can make one map to return only the value and then make a reduce to add them Take this example: let usuarios = [ { nome: 'Diego', Valor: 23, empresa: 'Rocketseat' }, { nome:…
-
2
votes2
answers94
viewsA: Action by clicking on the clear vuetify field
The problem is in the syntax @click.clear="clear('mes')" change to @click:clear="clear('mes')" not if exactly because but I believe that the : add to a Watcher on the click that even when you’re off…
-
1
votes1
answer26
viewsA: Creation of Global Vue component
Your syntax of the method Vue.component is incorrect, the correct syntax is Vue.component('app-menu', Menu)
-
0
votes1
answer87
viewsA: ORDER OF EXECUTION VUEJS
you must use the await to wait for the first Password that brings the token and only then will perform the second request, and for that you must declare the Token as asynchronous, for example async…
-
2
votes3
answers551
viewsA: Ternary operator Vue.js within Tag
You could also do <select name="select" :multiple = "multiple"/> depends a lot on what you want, but I believe that in most cases this way would be more efficient because at the time of giving…
-
5
votes1
answer111
viewsQ: Set does not remove duplicate objects
I have an array of objects and always to remove duplicate objects use the new Set(array), but this time did not work as expected. In the following example, it is easier to understand. I’m passing my…
-
0
votes1
answer104
viewsA: V-model with Vuex push in the array in the store
I’ll try to help you kkkkkkkk.... When using vuex you should not "mutate" the state without using any mutation, and this yours v-model is doing, in other words, using vuex, do not use v-model in the…
-
6
votes4
answers326
viewsA: How to change the value of an object array?
Boy I believe the easiest way to settle this is with a map, for example : const novosUsuarios = usuarios.map(u => ({ ...u, idade: u.idade * 2 })); console.log(novosUsuarios); made a example…
javascriptanswered Germano Buss Niehues 795 -
1
votes1
answer30
viewsA: Remove SQL CASE parameter agreement results
SELECT NFE.CD_CLIENTE AS "COD. DO CLIENTE", EMP.NOME_COMPLETO AS "CLIENTE", COUNT(NFE.NF) AS "QUANTIDADE_COMPRAS_PERIODO" FROM FANFISCA NFE LEFT JOIN GEEMPRES EMP ON EMP.CD_EMPRESA = NFE.CD_CLIENTE…
-
1
votes1
answer65
viewsA: Error removing Child in List (li) Javascript
Good morning, based on your comments I understood your problem, I came to this resolution : if ($ul.children[0]) { $ul.removeChild($ul.children[0]) } else { alert('A lista está vazia'); } before…
javascriptanswered Germano Buss Niehues 795 -
0
votes2
answers134
viewsA: Error printing Array List in Java
for (Empregado x : list) { System.out.println(x); } In your code you are giving a System.out.println on the whole object, if I am not mistaken it will return the object hashcode, to return the…
javaanswered Germano Buss Niehues 795 -
1
votes3
answers137
viewsA: Using IF and UPDATE in a PROCEDURE to update a table
DECLARE v_tem number; BEGIN select 1 into v_tem from co_t_conf where p_variavel = chave_da_tabela; if v_tem then UPDATE else INSERT end if; --Eu preciso atualizar o nome_variavel se o valor…
-
0
votes2
answers66
viewsA: How to "reset" the other SQLSERVER line
DECLARE @DATA INT SET @DATA = 2019 SELECT TB.Cliente, TB.CODIGO, TB.Descricao, GROUP_CONCAT(tb.Caracteristica ORDER BY tb.Caracteristica SEPARATOR '-'), TB.ANOAnterior, TB.ValorAnterior,…
sql-serveranswered Germano Buss Niehues 795 -
1
votes3
answers85
viewsA: QUERY LEFT JOIN - MYSQL
SELECT `permission`.`visible`, `menu`.* FROM `tb_permission` `permission` LEFT JOIN `tb_menu` as `menu` ON `menu`.`id` = `permission`.`menu_id` WHERE `permission`.`visible` = 1 AND…
mysqlanswered Germano Buss Niehues 795 -
1
votes1
answer69
viewsA: Problems in select using Having MAX non-boolean expression
Cara I believe I missed comparing the patient code in the clause having: SELECT DISTINCT osm_pac, osm_dthr FROM osm WHERE osm_serie BETWEEN 115 AND 119 AND osm_str = 'GLA' GROUP BY osm_pac HAVING…
-
0
votes2
answers86
viewsA: Problem inserting data into Sqlite and updating Recyclerview
Why not use the recover() method to update and bring it all? Then add it to your List and play on Adapter... public void adicionarLiivro(Livro livro){ livros.add(livro);…
-
2
votes3
answers793
viewsA: How to delete only records from a field of my table in SQL
update produto set dt_saneamento = null; Update the table by setting the field to null.
-
1
votes2
answers475
viewsA: SQL - Bring the name of the city with the highest number of sales
making sum in sales value will bring the one that sold the most in value, bring the one that has the most sales would be with Count SELECT C.Cidade, count(1) FROM Clientes C INNER JOIN vendas V ON…
sqlanswered Germano Buss Niehues 795 -
0
votes3
answers202
viewsA: Sql query bring repeated result
Give a select in all fields and group by them, after a having Count>1 select setor,quantidade,usuario from arquivo_coletor group by setor,quantidade,usuario having count(*) >1…
-
0
votes2
answers206
viewsA: Mysql - auto increment shared between tables
In my sql do not know, you can try to create a Quence, I do not know if it would work, in Oracle I would create a Quence, only that at the time of giving Insert you will have to give a…
-
-1
votes1
answer107
viewsA: How to select distinct from the Listagg function in the 12C database
Dude I believe no, what you can do is a wm_concat(distinct mib.segment1) and then give a replace na , by -, inside pro listagg I could never use distinct
-
0
votes2
answers2215
viewsA: What is the difference between using a "Constraint" in "Foreign key" or not?
Constraint ensures that data integrity, for example we have a table X and Y, where X has a FK with Y, if you try to delete a record from table X without deleting first from table Y the records that…
-
2
votes2
answers766
viewsA: 2 Foreign keys in the same key
You are referencing only one field and Foreign key has 2 fields, I don’t know if this will work but try to create two fks, one for destination and one for arrival CONSTRAINT fk_voo_aeroporto_origem…
-
0
votes2
answers343
viewsA: How do I get the latest date by following a SQL filter?
Make a subselect that brings the maximum date and in Where compare if the date is the last one, like this: select ex.gsm, ex.motivo_envio, ex.status, ex.data_ativacao, ex.data_importacao,…
-
0
votes2
answers147
viewsA: Take duplicity by ignoring a column with distinct information
SELECT a.idEmpregadoReserva as Controle ,(select EmpresaAplicativo from tbEmpresaAplicativo where tbEmpresaAplicativo.idEmpresaAplicativo = c.idEmpresaAplicativo) Colonia ,d.Nome ,d.Matricula…
-
2
votes1
answer325
viewsA: Oracle - Alias in Case
Put the alias after the 'end' CASE atu.cod_situacao_matricula WHEN 2 THEN 'Matriculado' WHEN 3 THEN 'Outro' END as Teste
-
4
votes1
answer9613
viewsA: Oracle - ORA-01722: invalid number
COB.TXT_NOSSO_NUMERO = to_char(carnes(i)); Try it this way
-
2
votes2
answers32
viewsA: I need to do a data conversation of 2 different tables
SELECT id,nome,emissao,vlrparcela,vencimento,pago FROM tab1 JOIN tab2 ON tab1.matricula=tab2.matricula; thus?
-
2
votes1
answer79
viewsA: Use of two WITH
WITH ITEM AS (SELECT 1 COD, 'Tratam./Hormônio' NOME, 1 VENDA from dual UNION ALL SELECT 2, 'Vacina', 1 from dual UNION ALL SELECT 3, 'Nutricional', 2 from dual UNION ALL SELECT 4, 'Pastagem', 2 from…
withanswered Germano Buss Niehues 795 -
2
votes1
answer37
viewsA: I have to deliver this question and I’ve tried and failed to answer. About Vetor
If I still remember something visualg is like this algoritmo var numerodesejado : inteiro posicaodesejada : inteiro i: inteiro numeros: vetor[1..10] de inteiro inicio posicaodesejada <- 0…
visualganswered Germano Buss Niehues 795 -
0
votes1
answer54
viewsA: Change multiple identical words in Oracle query
If I understand what you mean, crtl+f then you click on 'Replace'
-
2
votes4
answers300
viewsA: Doubt about denial operator
This is because Java is heavily typed? It’s not just because Java is heavily typed but because Javascript is weakly typed, let nome = "Renan"; if(!nome) alert("Sem erro"); else alert(nome); This…
-
2
votes3
answers254
viewsA: How to concatenate a varchar into a Mysql function?
concat(dado,'teste') that would be it?
mysqlanswered Germano Buss Niehues 795 -
2
votes1
answer124
viewsA: Interrupt Thread (Java) does not kill execution in Oracle database
From the moment you have the script run I believe that stopping Thread will no longer help, you will have to send a ALTER SYSTEM KILL SESSION 'sid,serial#'; after interrupting Thread, creates a…
-
1
votes1
answer407
viewsA: Set a condition in order by mysql
If I could understand what you meant it would be this, SELECT ID, ORDEM, NOME FROM agenda ORDER BY (case when ordem = 0 then ordem end) desc, (case when ordem <> 0 then ordem end), ID ASC;…
-
0
votes1
answer84
viewsA: Procedures MYSQL - Pass parameters or not
Easiest way to do it is like this: BEGIN SELECT A.idAluno AS CodigoAluno, A.NomeAluno AS Nome, A.SexoAluno AS Sexo, A.DataNascimento, T.Turma, S.Serie, T.Turno FROM tbAluno A INNER JOIN tbTurma T ON…
-
0
votes1
answer195
viewsA: CLOB Filter - Number+text
I can’t test it now, but try it this way: Having dbms_lob.substr( campoclob, 4000, 1 ) like '0||Sim'
-
1
votes1
answer127
viewsA: Exception java.lang.Numberformatexception (files)
It is because there is coming a blank space along with the 1 after the comma, try a linha[2].trim(); before doing the parse for Integer.
javaanswered Germano Buss Niehues 795 -
0
votes1
answer40
viewsA: Doubt Bring Specific Date - Oracle
Create a precedent and pass the values by parameter p_data_ini and p_data_fim select data from (select to_date(:p_data_ini) + level - 1 data from dual connect by level <= (to_date(:p_data_fim) -…
-
0
votes2
answers343
viewsA: Sql for plot counting
There must be a better way to do it, I would do with CTE on Oracle (which is what I use) but on Mysql I would try something like this: select (select count('X') from boletos where vencimento <…
mysqlanswered Germano Buss Niehues 795 -
2
votes1
answer71
viewsA: How do I filter the data downwards?
I think what the exercise calls for is a sum of the total amount that would be : select id_nf,sum(quantidade * valor_unit) as valor_total from objects group by id_nf order by 2 desc…
mysqlanswered Germano Buss Niehues 795