Questions tagged as 'postgresql'

1
answer

Error with Insert in Postgresql in C #

I have a problem that I can not solve because I do not see the error. I am developing a simple project in C #, when I execute a stored procedure of Postgresql (Insert): pgsqlCommand cmd = new NpgsqlCommand("select insertclientes(" + @idcuenta_...
asked by 06.08.2018 / 17:30
2
answers

Insert an Excel file in PostgreSql

I am looking for information on how to insert an Excel file in PostgreSql, but I can not find information, there is no guide or tutorial from scratch, all are concrete problems on the internet. My intention is for the client (Angular2) to sen...
asked by 12.07.2018 / 11:48
1
answer

How do I create a backup in PostgreSQL with .batch

I have a bat that creates the backup of a BD in PostgreSQL. This is the batch code: @echo off SET PG_BIN="C:\Program Files\PostgreSQL\bin\pg_dump.exe" SET PG_HOST=localhost SET PG_PORT=5432 SET PG_DATABASE=CELAUSystem SET PG_USER=postgres SET...
asked by 11.07.2018 / 04:34
2
answers

join brings me more data

I am making a query to 2 tables the main table t_person has 128176 records and the table t_evaluation has 135839 the evaluation table can have several times the code of the person since a person can have 1 or more evaluations What I need to do i...
asked by 10.07.2018 / 17:48
1
answer

Query Sql to bring data if they exist or not according to the relationship

I have all the months and in each month, there is some data (Enrollment), given the case that there is no data in that month I want that month to appear with a zero. This is the query I have: Select meses.mes as MES, SUM(cantidad) as M...
asked by 05.06.2018 / 20:53
2
answers

Validate if there is an id in the database, if there is an update and if there is no insertion to do it - PHP and postgresql

Good afternoon as you can see in the title, I want that at the time of entering the data to the bd of postgresql first verify that the "doc" exists, if there is an update and if there is no do an insert into , I tried and reading in forums examp...
asked by 28.05.2018 / 19:28
1
answer

how can I concatenate records from the same column in sql server?

If you could help me, I have a table like this: identificativo fecha 72028586 11/05/2018 72028586 13/05/2018 72045976 17/05/2018 72063798 13/05/2018 and I need to make a query to show me th...
asked by 21.05.2018 / 18:07
1
answer

Search a record in all Postgresql tables

I am currently looking for a query or a script that allows me to search for a word among all the tables within the same database, searching the internet for this code: CREATE PROC SearchAllTables ( @SearchStr nvarchar(100) ) AS...
asked by 07.05.2018 / 21:01
1
answer

Massive data upload process in postgresql

I have been researching this and sincerely what I find of information does not convince me (little information, by the way) what I try to do is enter 5000 data in 4 different postgresql tables and I have found that the COPY function works for a...
asked by 16.03.2018 / 22:29
1
answer

Filter by weekend in a certain range of hours. Django

I am trying to make a query that I return the number of orders that your delivery date is during the weekend between 7 am - 11 am and I have been trying this way: Order.objects.filter(delivery__range=[breakfast_start_date, datetime.now()], sta...
asked by 13.03.2018 / 23:07