Questions tagged as 'sql'

1
answer

Search last registered date in cpf_cnpj sql

I have a basis that I need one of the columns to be the search for the lowest date registered in that CPF / CNPJ at the base. In the example would create the column data_anterior : cpf_cnpj | aplicado| data_aplic | data_anterior ---...
asked by 18.05.2018 / 01:31
2
answers

Arithmetic overflow error converting expression to data type int in count

I've seen several answers about this message    Arithmetic overflow error converting expression to data type int. However, everything they indicated did not work. It only gives error when I use count . Code: SELECT COUNT(D...
asked by 09.01.2017 / 17:44
1
answer

Problem with functions

Hello, I have the following problem, I have a view in the database that makes a group by , and I have another table GraficoCor , I want to make every time that While of the first function makes a increment, it passes the...
asked by 18.04.2016 / 20:12
1
answer

How to make a SQL do the correct count of real estate under certain criteria

I have the following SQL that correctly counts the number of properties: select clientes.id, clientes.nome, clientes.status, clientes.cliente, clientes.tipo, clientes.disponibilidade, imoveis.id, imoveis.cod, imoveis.status, imoveis.vvenda,...
asked by 16.03.2016 / 12:41
1
answer

Access level layered login system

Good morning, I'm doing a course completion software at school, and I need to make a login system with access level (I'm programming in layers and using SQL SERVER 2012) . I saw a tutorial on the net that the user had to choose the level of...
asked by 06.08.2015 / 16:17
1
answer

Android communication and SQL database [closed]

I'm developing a web application that aims to manage inventory, sales projections, etc. of a company. However, sellers travel to make sales and have requested that they also make an application that communicates with DB. To do this, I need to be...
asked by 21.07.2016 / 22:40
2
answers

PHP - SQL: display the user's email through the database

Galera, is as follows: Having made the user's registration on the site, it saves it in the database (obvious). This is the code for connecting to the database (is that correct?): <?php echo $sql= "select * from users order by emai...
asked by 13.07.2016 / 22:18
1
answer

How do I validate SQL for specific fields

I have the following code made by Amon : select id, disponibilidade, tipo from clientes where cliente = '$cliente' AND status = '2' AND (tipo <> '0' AND (disponibilidade <> '0' OR vanual <> '0' OR vtemp...
asked by 15.03.2016 / 13:12
1
answer

What attribute do you use for database fields that work with numbers from 0 to 5?

I needed to set up a table in MySQL, where the values written in this table would be between 0 and 5, what attribute types within the table field should be assumed? What kind of data do we report in column tipo_DADO ? The issue of the c...
asked by 10.03.2015 / 08:09
1
answer

Query with two sorts in descending order

Is it possible to execute a query by searching for the contract number, sorting by decreasing date and their respective work orders? If yes, can you give me an example for knowledge ?? Query used: SELECT * FROM field WHERE contrato LIKE '...
asked by 01.10.2018 / 12:57