Questions tagged as 'sql'

1
answer

How to return results with integers and nulls?

I'm trying to set up a Query but they are not having success, in my database I have 28 information with code 32, and 62 information with code 23, but there is information with the null code, and I wanted to bring them all together , the problem...
asked by 16.08.2016 / 13:30
1
answer

How to create a select in firebird?

Create a select listing 03 fields of any table, sorting the data by the 2nd field. I am very weak in firebird can anyone tell me how I would do this?     
asked by 21.06.2016 / 00:51
1
answer

How to join 4 tables in SQL that is returning empty? (Inner, outer, or left join)

I have 4 tables with the following relationships: Products have N Variations Sizes have N Variations Colors have N Variations Variations belongs to Products, Sizes and Colors The structure of the tables looks like this: Variatio...
asked by 02.06.2016 / 19:21
1
answer

Is it possible to select a table column without entering its name in SQL?

So I was searching but I did not find anything about it, but I need to sort the first and second columns of the table without knowing what they are. My code is this: <?php $preparaNormalizacao=$con->prepare("SELECT * FROM ".$tabelaExtern...
asked by 19.06.2016 / 00:18
1
answer

How to set a maximum size for a BLOB field?

I want to insert images and I want each record to have a maximum of 100M, if this value is exceeded, an error must be returned in the bank itself. For illustration example of problem: (same as error is returned if we try to insert a string of...
asked by 25.05.2016 / 13:24
1
answer

How to maintain the connection to the Sql for a long period

My application does select in the A table of server 1 and with the result of select a insert is done in table B 2 server with query data. The routine works for a certain time, then I have this exception:    System....
asked by 19.10.2016 / 20:06
1
answer

Days difference between records and display only the results that 14

I have the following query: SELECT V.CHAPA, F.NOME, V.DATA, DATENAME(dw,V.DATA) AS DIA, MAX(V.SEQUENCIALBATIDA) AS BATIDA FROM ARELBATIDATRANSITOVIEW AS V LEFT JOIN V_DADOSFUNC AS F ON V.CHA...
asked by 19.10.2016 / 23:24
1
answer

Query to transform columns into records

I have a query that involves multiple tables in Oracle, and returns a large number of columns. I wanted to instead of returning the records from this query, I would return the select columns as records. An example of how more or less the curr...
asked by 01.07.2016 / 14:37
1
answer

Query ORDER BY dynamic from the selection of a comboBox

I'm developing an application in java that manages a database. This application primarily performs a SELECT database, then submits ResultSet to an editable table. I tried to add a comboBox to the user to select the orde...
asked by 04.05.2016 / 11:57
1
answer

Direct sum in PHP

I have a service control system. I would like to issue a service report and add these values but I did not want to do with the command in sql I want to make direct in php , type sum values of column valor_trabalho of listed s...
asked by 03.05.2016 / 22:40