Questions tagged as 'postgresql'

1
answer

Spring-Boot + Thymeleaf, load data in Bootstrap modal window

Good afternoon! I'm using spring-boot and thymeleaf to develop a java application, I'd like to know how I can load logs into the modal bootstrap window by clicking the link in the table that lists the logs. Example: In the user query screen,...
asked by 10.04.2017 / 22:19
1
answer

Calculating Random Password using ArrayList and ResultSet in Java

Good morning, I have a question, I need to calculate a new password for each patient when I go through this method: ps = getConexao().prepareStatement(SQL_VERIFICAR_PROTOCOLOS_PENDENTES); ps.setDate(1, new java.sql.Date(dto.getDa...
asked by 28.03.2017 / 15:01
3
answers

Problem with accent when saving text to the database

Good morning guys, I have the following problem. My system makes changes to a table in the database, if the content is inserted directly by script in postgres, accenting works normally, but when updating the text by the system, the accent does n...
asked by 27.04.2017 / 15:15
2
answers

Error in the codeigniter's querier builder

I have a SQL problem in my query, it follows: $sql = "SELECT cl.codigo, pa.codigo AS codigo_participante, pa.nome AS nome_participante, cl.usuario, cr.data AS data...
asked by 13.03.2017 / 23:32
1
answer

Select count Java

I want to make a select with the count function and bring all the records of a table, but when displaying the amount in the textfield, it displays a different result. I'll put the code for you to analyze: Error Displayed MycodepublicvoidT...
asked by 15.04.2017 / 03:46
1
answer

Date in postgresql.PL/SQL

With the function below I want to make this function compare the current date with the date stored in the database. create table mercado( id integer, diaEntrega date, valor integer ); insert into mercado values (2,'7-02-18',1...
asked by 17.02.2017 / 17:59
1
answer

PG_DUMP via shell_exec returns "no password supplied"

I successfully execute the following command through the terminal: pg_dump -d teste -h 127.0.0.1 -p 5432 -U postgres -w -f /home/william/pgsql/17032701.backup However, when I execute the command by shell_exec of PHP , I...
asked by 27.03.2017 / 03:30
1
answer

Update with calculation

I have a product table and I want to calculate the profit margin based on the columns preco_venda and preco_custo done as below: update produto set margem_lucro=((((preco_unit/preco_custo)*100)-100)) Error occurs    ERROR:...
asked by 25.03.2017 / 18:18
1
answer

Error converting object type to int

I'm doing a select in the database, using ExecScalar returning an object but I can not make a cast of this returned value to integer. public static int ConsultaPDVsAtivos() { NpgsqlCommand sql = new NpgsqlCommand(); sql.CommandText = "...
asked by 09.02.2017 / 13:03
1
answer

UPDATE field BIGINT [] from a SELECT

I have an update in a field permissao_ver Being the same type bigint[] , field response: '{1,2,3,4,5,11,44,56,75,11}' My Query UPDATE callcenter.pausa SET permissao_ver = '{"(SELECT cod_grupo FROM crm.usuariosgru...
asked by 25.01.2017 / 20:11