Questions tagged as 'query'

0
answers

Change varchar data type to int

Is there any problem in changing the data type from varchar to int in mysql? I have a spreadsheet with some items that have been entered as varchar, all are numbers. The problem is that I need to do a bigger and smaller search, however, as it is...
asked by 03.01.2018 / 13:52
1
answer

Query MySql to display records not linked to a certain company [duplicate]

I need to create a query in SQL . I have three tables: TABELA 1: EMPRESA emp_codigo (chave primaria) emp_nome TABELA 2: PALAVRAS_CHAVE pal_codigo (chave primaria) pal_nome TABELA 3: VINCULO vin_codigo (chave primaria) vin_empresa...
asked by 11.12.2017 / 20:41
1
answer

Update Multiple Columns

I have the following situation, I need to update the SB1300 table in the B1_DESC and B1_CODBAR fields for several lines. The where will be B1_XCODORI Can I do the same query?     
asked by 06.12.2017 / 14:47
1
answer

It takes a lot of queries in mysql

Hello friends I'm having a hard time finding what's wrong in my SELECT code in mysql, this is taking over 70sec I do not know why. Someone there to help me please? Code: SELECT id_aluno, nome_aluno, ano_lectivo, data data_pagamento_m, nome_...
asked by 06.12.2017 / 17:02
1
answer

Limit the number of requests in the query

I have query that does one request at a time, in random order. $sql = "SELECT * FROM 'viperusers' WHERE vip < 1 AND username != :username ORDER BY RAND() LIMIT 1"; Explaining, I select all my users, if it is mine ignore, as you can see...
asked by 02.12.2017 / 03:07
1
answer

Sql does not return column name

I have two tables with TEAM other MATCH_DETAILS . The TEAM table has the id column and is the primary key. I made two relationships from the TEAM table to MATCH_DETAILS . In MATCH_DETAILS assumed as...
asked by 05.12.2017 / 13:49
2
answers

Remove repetitions in sequence from select Oracle

I am having a question for mounting a query on Oracle, I have the following so far ... SELECT M5.NIVEL_ESTRUTURA , M5.GRUPO_ESTRUTURA , M5.SUBGRU_ESTRUTURA , M5.ITEM_ESTRUTURA , M5.SEQ_OPERACAO , M5.CODIGO_ESTAGIO FR...
asked by 27.11.2017 / 12:24
1
answer

Doubt SQL query via primary key in PHP?

I'm starting in the PHP language, and I need to return a simple query made in sql from a variable that gets the value entered by the user. Being that, it will only display the result of the primary key search. But in the code below what you type...
asked by 25.11.2017 / 01:38
1
answer

Doubt - Query SQL Server 2012

Good morning! I have a query below that I need to bring inside the case only when the TarVencimento is smaller than today's date (so far I have been able to do it), but only when today's date is until the 5th day after the date of maturity. E...
asked by 22.11.2017 / 12:20
2
answers

Change column data [closed]

How can I change the column data? I wanted to change some bits to false but I do not know how. using (SqlCommand cmdadd = new SqlCommand("INSERT into Usuarios (Cadastro) VALUES (@Cadastro)", connection2)) { cmdadd.Parameters.Add(ne...
asked by 19.11.2017 / 13:39