Questions tagged as 'sql'

1
answer

Group continuous replications with MySQL

I wanted to know if there is any way to group repeats using only MySQL. If you do a SELECT * from tabela WHERE id_usuario = 1 ORDER BY id ASC will return: id | id_usuario | Data | Texto 0 | 1 | 2016-10-16 | Sua senha...
asked by 20.10.2016 / 16:25
2
answers

System.Data.SqlClient.SqlException: Conversion failed when converting the varchar value to int

I'm getting this exception in C # when I try to read SQL data. I am having doubts if this error is problem with my SQL or in C #. My SQL code that does the conversion is this: '$ (SELECT ORDEM FROM TABELA UP (NOLOCK)...
asked by 20.10.2016 / 13:47
0
answers

Find out how many products I need to sell until I reach the goal [closed]

This is a question that requires logical reasoning, but come on. How to do in SQL, it can be a function, a way to find out how many products I need to sell to reach the goal. For example: I sold a particular product and I need to know h...
asked by 01.12.2016 / 16:49
0
answers

Duplicate image error in the save!

My function that saves the images in the folder works correctly, but when I open the folder of the photos the images appear duplicate but with different names Here's the save function: protected void btnSalvarImovel_Click(object sender, Eve...
asked by 19.10.2016 / 03:23
0
answers

Problem inserting the mysql bank in php [closed]

I'm developing a project for college and I'm having some problems inserting into the my_sql database, my problem lies in that section. mysqli_query($conn, "INSERT INTO funcionario( codigo_funcionario, nome, cpf, data_na...
asked by 26.11.2016 / 17:46
1
answer

Procedure to create database and its tables

I need to create a database for each client that performs a particular registration, so I created a procedure to do such thing. But I came across a small identification problem. When I run procedure it creates the database with...
asked by 28.11.2016 / 13:45
1
answer

Dynamic insertion according to date and days of the week

I'm creating an application using webservice in PHP. Within the application the user will define specific days to generate an alert, for example: second fourth sixth In this way, I would like my bank to log an entire event, Monday,...
asked by 05.11.2016 / 14:16
0
answers

Operations with calculated fields from a mysql view

Good afternoon, I have a view where there are several fields where I have several calculations, and the result of these calculations would like to use in other fields of this same view. An example: select (tab1.campo1+tab1.campo2)/ta...
asked by 05.10.2016 / 21:56
0
answers

Save multiple photos in the SQL database in the same ID

I'm having trouble saving multiple photos in a single id This is the cs of the page that makes the registration protected void btnSalvarImovel_Click(object sender, EventArgs e) { try { var cmd = new SqlCommand("...
asked by 05.10.2016 / 02:25
1
answer

Query with jpa + hibernate with more than one idt in clause

With hibernate I can do a query by idt as follows: entityManager.find(Empresa.class, idtEmpresa); And this would already return the mapped object of the enterprise class, but what if I wanted to query more than one idt, what would it look l...
asked by 22.10.2016 / 17:49