Posts by Fernando Júnior • 130 points
12 posts
-
0
votes3
answers193
viewsA: Select only first place in the first half - SQL Server Code
You have to first check which error is displaying. Anyway, try the select below: SELECT P.Data, Nm.Name, Epp.Posiofinal FROM Prova P, Piloto Nm, Equipaparticipaprova Epp WHERE Epp.Posicaofinal = 1…
-
1
votes1
answer2191
viewsQ: Email with Python attachment
I have a script that sends an e-mail request mirror. However, it sends the attached mirror of type . htm I would like it to send in pdf. Below is the script #!/usr/bin/env python # -*- coding: utf-8…
pythonasked Fernando Júnior 130 -
1
votes1
answer465
viewsA: Extracting postgresql data to file
The user you are accessing the database is not allowed to create the file in the /home/Jessica directory/ You can do the following command: COPY historico TO '/tmp/teste.txt'; In the /tmp directory…
-
2
votes1
answer387
viewsA: Update of Mainactivity items
You can restart Activity after entering the data. Intent intent = getIntent(); finish(); startActivity(intent);
-
1
votes1
answer138
viewsA: QUERY SELECT (oracle sqldeveloper)
Try something similar to the query below: WITH query1 AS (SELECT COUNT(*) S, CLI.ID_CLIENTE FROM VW_SOLICITACAO_DETALHE VW INNER JOIN SOLICITACAO SOL ON SOL.ID_SOLICITACAO = VW.ID_SOLICITACAO WHERE…
-
1
votes1
answer145
viewsA: Syncing the Desktop and Mobile Database?
You should do it this way: Stores everything in the bank postgres and access the information via JSON on mobile device. Then, when you did an update in the bank, you would warn via JSON itself by…
-
1
votes1
answer112
viewsA: query optimization that adds values according to a clause
Try something like this: WITH querys AS ( SELECT COALESCE(sum(movvalpri), 0) AS limite, null AS consumo, null AS saldo, null AS data_ultima_autorizacao FROM car550 INNER JOIN car400 ON…
-
0
votes1
answer599
viewsA: Query Performance - Postgresql
Try the following: WITH tbaux AS ( select vei.id_veiculo, vei.id_cliente, vei.id_empresa, ofi.no_os, ofi.dt_emissao, ofi.id_empresa as empresaofi from syo_veiculo vei join syo_oficina ofi ON…
-
1
votes1
answer117
viewsA: How to define column types when making a copy for Postgresql
Date format is not the same as the bank. By default, the format is YYYY-MM-DD HH:MM:SS You can change the date format of the section with the command: SET datestyle TO (format); Following is the…
postgresqlanswered Fernando Júnior 130 -
0
votes5
answers9719
viewsA: Copy data from one database to another postgress
It all depends on the periodicity of it. If it is only once, you can take a backup of the table by pg_admin and a restore in the other bank. If you want to send only a few records, you can use the…
postgresqlanswered Fernando Júnior 130 -
0
votes3
answers119
viewsA: Migrate JSON request from android to Swift
I am calling the function as follows: func validatorLogin(){ Let Muser:Nsstring = txtUsuario.text! Let mPassword:Nsstring = txtSena.text! let userPasswordString = "\(mUser):\(mPassword)" let…
-
0
votes3
answers119
viewsQ: Migrate JSON request from android to Swift
I’m having a problem migrating a code from an android app to a code in Swift. This code is responsible for authenticating the user and password of an application. I am unable to run Swift 2 on Xcode…