Questions tagged as 'sql'

2
answers

Select with fields without values

I am making a SELECT where together two tables: a stock balance table in stock and another table with purchase order. I'm doing a comparison between balance of products in stock and balance in purchase orders, but the way I'm doing,...
asked by 05.07.2018 / 00:30
2
answers

Error # 1064 in CREATE PROCEDURE - PhpMyAdmin SQL

PhpMyAdmin message: Mensagens do MySQL : Documentação 1064 - Você tem um erro de sintaxe no seu SQL próximo a '@NumeroSerie INT(11), @Velocidade TINYINT(4), @Direcao SMALLINT(6), @Latit' na linha 2 Code that is in er...
asked by 14.10.2018 / 00:42
1
answer

Exit command in PL / SQL

I have noticed that the command exit works the same as a break, it stops executing the current block and passes to the next one, but which command can stop the whole procedure in PL / SQL?     
asked by 05.08.2018 / 20:11
1
answer

Python Connect Sql With user and "token"

I have an application in Flask and I'm using SQLAlchemy to get access to SQL Server. I would like the connection to the database to be made by a generic user and the password is a "token", I thought it would only replace the parameters but no...
asked by 29.08.2018 / 19:56
1
answer

SELECT with intermediate table returning all values in the same field and separated by commas

I have the tables (and their relationships) in the diagram below: I need to do the following: Bring all the fields of the TBCADCRE table and an extra column named ADQ with all the TIPADQ that the user has (can have a maximum of 6) separate...
asked by 23.08.2018 / 23:39
1
answer

Valid working hours

How do I calculate the time spent on calls taken by an employee? But always within the valid work schedule, and knowing that an employee's work schedule is between 08:00 and 18:00. For example: table named_status_log. ______________________...
asked by 26.07.2018 / 15:04
2
answers

Select to know customers without service in the last 30 days plsql

I have the following columns: CODCLI, CLIENT AND DTULTCOMP I need to know the customers who have not bought in the last 30 days. the DTULTCOMP column is in DATE format Table: PCLIENT     
asked by 28.06.2018 / 16:52
1
answer

Converting a LINQ query to methods

The following query in LINQ (with query) below is used to list all providers that have an account (relationship 1 to 1): from f in fornecedores join c in contas on f.ID equals c.FornecedorID select f How can I achieve the same result using...
asked by 06.09.2018 / 20:10
1
answer

Check the names of the pilots sponsored by a Team

I want to consult pilots sponsored by team 'A' I'm doing this: SELECT piloto.nome AS NomePiloto FROM equipe INNER JOIN piloto ON equipe.idequipe = piloto.idequipe INNER JOIN patrocinador ON patrocinador.idpat = equipe.idpat WHERE patrocinad...
asked by 07.09.2018 / 05:56
1
answer

Get value from the right set with 'ambiguous' fields

I'm doing the following query to my database: $escalacoes = 'SELECT * FROM escalacoes AS e JOIN jogador_rodada AS jr ON e.id_jogador = jr.id_jogador WHERE e.rodada = ('.$rodada_atual.' - 0) AND jr.rodada = '.$rodada_atual; $escalacoes...
asked by 08.07.2018 / 00:42