Questions tagged as 'sql'

4
answers

Can I put a WHERE for each column?

I want to put a condition for each column in my SELECT, is it possible? SELECT count(id_casa) as casaAzul, count(id_casa) as casaAmarela FROM tb_casa Where: Where column 1: where cor_casa = 'azul' Where column 2: where cor_casa = 'yellow'...
asked by 28.09.2018 / 20:09
3
answers

Decimal problems in SQL string

I'm having an error: every time the variable c.Value_value passes the SQL string, automatically, the "." which separates the Decimal is converted to ",". Asyoucanseeinthisimage,thevariableisusingthe"." usually. However,theSQLstringtakest...
asked by 05.07.2018 / 16:34
2
answers

Communication between javascript and PHP [closed]

Hello, I'm a beginner in php and javascript and I'm having a hard time creating iterative tables. In my case, I have an initial table: WhenIselectthelinethatIwanttochecktheaccidentsinmoredetail(incasetheoptionisSãoPaulo),anewtableisopenedinadia...
asked by 17.10.2016 / 03:46
1
answer

Copying table record to itself via vba [closed]

Can you copy a record from a table and insert it into it? I wanted to copy a record into a new one in the same table. INSERT INTO Produtos ( Produto, Preco ) SELECT Produtos.Produto, Produtos.Preco FROM Produtos WHERE (((Produtos.Produto)="AN0...
asked by 21.01.2014 / 18:36
3
answers

Select multiple tables at the same time in SQL [closed]

I have 5 tables on my system: pacientes - Primary key idPacientes anamnese - foreggin key idPacientes avaliacoes - foreggin key idPacientes intervencao - foreggin key idPacientes contrato - foreggin key idPacientes The pacientes tabl...
asked by 09.11.2018 / 02:47
2
answers

Is it possible to execute 2 queries at the same time in MySQL?

I need to create a stored procedure to update the salary of employees who earn less than 1000 and give a 10% increase. Other employees (who earn over 1000) will have a 15% reduction. I've done the following: DELIMITER $ CREATE PROCEDURE mod...
asked by 03.12.2018 / 02:09
2
answers

Order table values by Day and Month

I have this Select below: SELECT b.id, b.codigo, a.codacesso, a.seqproduto, a.desccompleta, b.quantidade, b.data_vencimento, b.data_atual, b.observacao, b.usuario, b.estado,...
asked by 14.11.2018 / 11:07
3
answers

How to make a query that only refers to the DAY of a date?

I have a MYSQL database and I need a SQL that looks at the DAY OF PAYMENT in the DIA field (this field will only have the DAY of the month that the client chose to make the payment, this field is of type INT) and show me some less than 5 days be...
asked by 29.03.2016 / 21:26
2
answers

Connection to db SQLITE and SELECT * FROM recycle_data WHERE $ variable

I'm making a program that allows the user to enter the ID of the person in question, and then displays all the data in a table. So far, I have these two codes: <!doctype html> <html lang="en"> <head> <m...
asked by 25.07.2018 / 23:00
1
answer

SQL query inside java

I have the following query inside a jsp file in Java. String sql = "SELECT * FROM products WHERE productName = ? "; I'd like my query to ignore camel case and return all words that were part of string . For example, Desktop...
asked by 08.09.2018 / 07:06