Questions tagged as 'sql'

1
answer

How do I do subtraction and display the result in MYSQL query

I have 3 Tables Vehicles idVeiculo | Placa | Prefixo oleomotor idMotor | idVeiculo | datatroca | kmtroca | horimetroca | proximatroca |idMecanico I have this query below that shows the result of the last changes of each vehicle...
asked by 01.05.2018 / 17:57
1
answer

Select the ROW_NUMBER of an excel table

Today I use SELECT * FROM [Plan1$] To select Excel spreadsheet data, I would like to know how to select the record row as well.     
asked by 02.05.2018 / 14:36
1
answer

How to do MYSQL subtraction

How to correctly subtract these two columns in the SQL script? SELECT DISTINCT b.prefixo as idVeiculo, max(datatroca) as datatroca, max(kmtroca) as kmtroca, max(horimetroca) as horimetroca,...
asked by 01.05.2018 / 23:45
1
answer

Combobox receive data in the second field (list menu)

Question: I have 2 Select Menu and I need the second select to change with data group according to the choice of the first one. Like for example car brand and models. In the first select the marks and in the second the models. Testing: I have...
asked by 05.05.2018 / 12:02
1
answer

How to mount a SELECT to return the last status change of each id?

I have the following table: status_faturas id_fatura | status | data ---------------------------------------- XX-XX-XX | 3 | 2017-01-04 21:00:24 XX-XX-XX | 2 | 2017-01-02 11:10:20 YY-YY-YY | 4 | 2017-01-04 21:00:24 YY-YY-Y...
asked by 05.01.2017 / 00:08
1
answer

Return values if any records do not exist

I have the tables: tabelaUm [id] [nome] 1 nome1 2 nome2 tabelaDois [id] [idTabelaUm] [nome] 1 1 nome1 1 1 nome2 1 1 nome3 1 2 nome4 1 2 nome5 1 2 nome6...
asked by 03.05.2018 / 04:31
0
answers

How to publish SQL Database in Azure and connect with MVC Web application?

Good evening guys, I have a problem here. I'm trying to upload an MVC + SQL Web application in Azure. Deploy works fine, Application is in the air. However, any connection to the bank fails. At the time of deploy, VS provides the option to creat...
asked by 03.05.2018 / 05:21
1
answer

How to do a sql query in MoongoDb with php?

How do I query the following sql query in Mongo? select * from myDB WHERE nm_pesquisa LIKE "%SAO%" AND tp_m = "A" OR tp_m = "H"; I tried the following but unsuccessfully: $query = [ 'nm_pesquisa' => ['$regex' => MDB::Regex($nm)]...
asked by 27.04.2018 / 22:10
6
answers

Is it wrong to write byte of images in the database?

When should I make this direct recording at the bank? What are the situations? I know I can save the image path to the bank.     
asked by 11.04.2014 / 18:53
1
answer

Join two SQL queries MariaDB

Two tables tab_Ord_Ser and tab_Pos_Alb . In two different queries I can know the values but I can not unite them in just one. These are: SELECT Prazo_Producao as Data, COUNT( 'Numero OS' ) AS Produzir, Tipo_Album FRO...
asked by 24.04.2018 / 21:18