Questions tagged as 'postgresql'

2
answers

Test without "messing up" (adding data) to the database

I'm having trouble doing integration testing. I test my database functions. My web application does not use any framework database connection and I am not able to do tests without messing up my database. I would like to know how to test wit...
asked by 29.01.2016 / 19:26
2
answers

Sql - Natural Ordering - Varchar

Situation I need to perform the natural ordering of the string. Example Processo 1 Processo 2 Processo 3 Processo 10 Processo 11 Processo 12 Order Pattern. (ASC) Processo 1 Processo 10 Processo 11 Processo 12 Processo 2 Processo 3...
asked by 15.10.2015 / 16:53
3
answers

Dynamic Search in C # and WPF

Good morning I would like to ask you a question about a dynamic search. Scenario: I have a search screen where the user selects 3 fields, which are: The first is the field of the search screen, where you select which field you wan...
asked by 20.03.2017 / 15:49
2
answers

Problem retrieving null Data for a DataTable in C #

I'm working with C # and the PostGreSQL Database, I have a field of type Date where it can be filled in dd / mm / yyyy or empty null. the same problem is related to any field of the table, if it is empty, even if it may be, the error occurs....
asked by 22.03.2017 / 22:27
1
answer

Postgress Crosstab - return and sql tuple descriptions are incompatible

I'm trying to use crosstab in postgres but ... CREATE TABLE tb_testect ( datahora timestamp without time zone, teste integer ); * Fix INSERT INTO tb_testect VALUES (TIMESTAMP '2016-01-01 08:30:00',1); INSERT INTO tb_testect VALUES (...
asked by 17.10.2016 / 16:02
2
answers

Passing values from a select to subselect

I have the following query: SELECT rp.colaborador as codigo_, t.nome, count(rp.*) as presencas, ((100 * (select count(rp.*) from empresa.cad_reuniao_presencas rp join empresa.cad_terceiros t on t.codigo = rp.colaborador join emp...
asked by 21.05.2015 / 18:51
2
answers

Select dates

I need to make a select that brings me instances that the start date of a license is less than 3 years from an employee's date of admission Below is an excerpt from my code. SELECT * FROM jmh_licenca l INNER JOIN jmh_servidor s...
asked by 02.12.2015 / 13:35
2
answers

Convert the SQL syntax of the Firebird database to Postgres database at runtime

I have a system developed in Delphi 7 already stable using the Firebird database, and some clients have requested that they can use Postgres as a database on that same system. As in some SELECT'S, my system uses some reserved Firebird words,...
asked by 24.11.2015 / 21:08
1
answer

Problem Nextval Postgres Delphi

I'm doing an application, in which I need to increment a sequence and check if that value has already been used in another table, because if it has already been I should ignore it and generate a new value for sequence until you find a unique...
asked by 04.03.2015 / 19:33
1
answer

I can not import data from a CSV to PostGreSQL with dbWriteTable from R

I am trying to import a CSV into a PostGreSQL database from R. On the PostGreSQL server, I created an empty database, called "Data". library(RPostgreSQL) library(sqldf) drv <- dbDriver("PostgreSQL") con <- dbConnect(drv...
asked by 09.10.2014 / 23:44