Questions tagged as 'sql'

1
answer

NullReferenceException when trying to write to the database

I'm having this error, when I'm going to write form data to the bank.    Error: System.NullReferenceException: System.NullReferenceExceptionocorridoHResult=0x80004003Message=Referênciadeobjetonãodefinidaparaumainstânciadeumobjeto.Source=...
asked by 13.10.2017 / 14:52
2
answers

Is there any security problem using public schema in PostgreSQL?

First time I'm working with postgreSQL and I'm having this doubt if it has any security issues using the public Schema that it creates? Or if it's just a matter of organization     
asked by 12.10.2017 / 20:38
1
answer

Left Join with coalesce

I have the following setores(idsetor,sigla,ativo) tables and another one with the executed services called ordem_servico(id,numero,idsetor,) . I want to count how many services a sector has canceled and when it does not return 0....
asked by 01.10.2017 / 22:36
1
answer

Return Oracle Timestamp

I want to convert a date to a number, a timestamp. Within a select I need to return the timestamp beyond it. Query example: Select sysdate, TIMESTAMP_DE_SYSDATE from dual Timestamp is a time stamp (or time stamp) that is a st...
asked by 03.10.2017 / 14:47
2
answers

How to format the output of resultSet via System.out.println in Java?

Hello, I am printing on the screen the result of a SELECT that I have stored in an object type resultSet (sql.ResultSet). But it comes out "all crooked". I tried to use the "\ t" between each printed column, but it did not help. Here is the part...
asked by 30.01.2018 / 19:56
1
answer

Pass a php array in a query and return multiple results [closed]

I want to pass a POST dynamic array of type: array(2) { [0]=> string(1) "1" [1]=> string(1) "3" } For an SQL query that returns multiple results depending on the string values in the array Select nome, count(avaliacao) FROM tabela W...
asked by 27.09.2017 / 10:49
1
answer

Query in MySQL when there are two ids

I have a table in MySQL that writes connection information from an IP PBX. It always stores the connection with a uniqueid itself. But I noticed that the time in the URA is also stored in the same table with the same uniqueid ....
asked by 27.11.2017 / 16:39
1
answer

Error in query INSERT INTO

I'm new using Oracle SQL Developer and I'm trying to make the query run but this is a bug, see the photo.     
asked by 25.11.2017 / 22:29
1
answer

MySQL Subquery Busting Error

I have a select to display 4 fields, but a field that is valor_pago is from another table, but I can not use JOIN otherwise the return of records conflicts So I created a Subquery but my question is: how do I get my amoun...
asked by 28.11.2017 / 19:42
1
answer

Error executing query in PostgreSQL

After executing this query: SELECT p.name as nomerecebe, r.created_at as datarecebimento, r.original_amount as valorboleto, rs.name as statusr, SUM(r.original_amount) as total FROM people as p, receipts as r, receipt_statu...
asked by 27.10.2017 / 21:41