Questions tagged as 'sql'

1
answer

Select data from the last file in the database and select file data from the previous time to the last one. Compare Data [closed]

After fetching two uploaded files, I go in the table to compare the data inside them Between 8: 50 e 23: 50 (with interval of one in an hour) it performs a check in a file of that bank that I call Time Search with the established Stand...
asked by 07.08.2017 / 15:25
1
answer

If you do not have the value to compare, save without making the comparison

I'm trying to make my application save if it has no value to compare, but it's always going through the comparison, I've already tried to put an if but it still has a problem, this is the class that compares my view to my database. Controller...
asked by 05.09.2017 / 17:12
1
answer

SQL query for more than one type of property, city and neighborhood does not work correctly

I got a template ready with some problems in the plugins and the queries. Of the 6 select fields to search for real estate, 3 of them can select more than once, type of property, city and neighborhood. The list of these 3 fields is generat...
asked by 28.08.2017 / 19:33
1
answer

performance in a select query [duplicate]

For the DBMS it is faster to get the fields all explicit or to use the * character representing all fields. If there is a difference what is the reason? Select coluna1,coluna2,coluna3, .....,colunaN from Or Select * from    The ques...
asked by 27.08.2017 / 23:16
1
answer

Count in multiple tables

I have 3 tables Ineedaquerythattakesthenameoftheschool,amountofclassestypeA,qtdeofclassestypeB,qtdeofstudentswhoareinclassestypeA,andqtdeofstudentswhoareinclassestypeB.>Sameasthisexample: I tried to do Select E.NOME, SUM(CASE WHEN C...
asked by 14.08.2017 / 19:03
2
answers

Difficult to mount query for Search in multiple columns

I have 2 tables tab_user user_id | nome_user | tel_user 1 jão 888 2 mari 999 3 jão 777 4 mari 666 tab_product id_produto | user_id| carac_a | carac_b | carac_c | carac_d 1...
asked by 08.09.2017 / 23:16
1
answer

Add SQLITE data in Java

Personal I have a problem that I can not solve in Java. The intention is to make the connection in a SQLite database. But I can not do the insertion. Take a look at the code, please. package conexao; import java.sql.Connection; import...
asked by 28.07.2017 / 21:08
1
answer

Selecting SQL Related Records

I have two tables, one that calls grupo where the groups created for access to an application are stored. For example, if you have the CADASTRO_ADMIN group, you will have full permission; now, if you have the group CADASTRO_USR...
asked by 21.07.2017 / 01:03
1
answer

Not bringing records - SQL Query

Good afternoon! Galera, below is the query that is to bring the number of active clients in one column and the number of clients blocked in another column, but when executing the query, it is null in both columns. NOTE: When executing the sep...
asked by 21.07.2017 / 20:42
1
answer

SQL in php script

SELECT CAST(REPLACE(CAST(DsXML as Nvarchar(Max)),' xmlns="http://www.portalfiscal.inf.br/nfe"','') as xml).value('(/nfeProc/NFe/infNFe/transp/vol/qVol/node())[1]', 'int') as [qVol] FROM SPDNFE WHERE CdIdNFe = 'NFe131612039761410001325500300004352...
asked by 08.08.2017 / 14:39