Questions tagged as 'postgresql'

2
answers

How to export some fields with their records to a new postgres table

If I had a table with n fields and m records and I want to create a new table with some fields and all the records, understanding that there are fields that image images among other formats, how can I import those records and fields in the most...
asked by 30.10.2017 / 18:03
2
answers

Remove zeros or zero in front of data

I have some data stuck in a table. I'll give you an example codcliente | first name 010 juan 011 pepe 012 Luis I need to remove the zero in front of each client code. I'm doing it on pgadmin and I can not find anything that can help me. I'...
asked by 26.11.2018 / 16:15
1
answer

postgres copy tables

Hello I have a database in postgres 9 which I have 139 tables but I need to copy only 7 tables that are new to put them in another database, If you can tell me how I thank you Thank you.     
asked by 02.08.2017 / 16:25
2
answers

Consultation with 5 union

I have a query, I have code SQL a union where I consult 5 tables, the common field is the fecha , how can I order to be ordered by the date of a table from one of those specific unions , here I leave the code SELECT...
asked by 17.11.2017 / 22:04
1
answer

Stack overflow in stored procedure (PostgreSQL)

I have this procedure stored in PostgreSQL: CREATE FUNCTION ratpais_indcicloinmo() RETURNS trigger AS $ratpais_indcicloinmo$ BEGIN UPDATE sde.ratpais SET indcicloinmo=(pond1cicloinmo)*(pond2cicloinmo)*(cicloinmo); END; $ratpai...
asked by 21.12.2017 / 21:27
2
answers

SQL QUERY - POSTGRES REGISTER REPEATED BY A SINGLE COLUMN [closed]

I have a table that has student scores: Code | test | score 123456 | p00001 | 3.2 | 123456 | p00002 | 1.0 | 123456 | p00003 | 5.0 | And I want to check out 123456 | p00001 | 3.2 | p00002 | 1.0 | p00003 | 5.0 |     
asked by 12.05.2017 / 18:08
2
answers

Convert object type Buffer to string in javascript [closed]

I have an object, which is part of a json that I bring from the database, with this structure: data:[83,78,77,80,32,65,103,101,110,116,32,52,65,32,32,32,86,101,114,115,105,111,110,32,110,97,109,101,32,48,46,50,46,53,32,40,50,53,41] (39) type:...
asked by 26.04.2018 / 15:39
1
answer

How do I perform an UPDATE with a SELECT of the field and the rows I need to Update? [closed]

I need to update 21 rows of a certain field, but to get to these 21 rows I have to make select e inner join with another table, as you can do UPDATE to this 21 rows. This is the SELECT that I use to get the data....
asked by 06.01.2017 / 20:37
1
answer

COUNT in postgresql

In the example shown on the following link link , what should the query we do be like so that the result have 2 columns, the first being the 21 countries and the second being the number of clients in each country? Thank you very much in adva...
asked by 17.10.2018 / 13:37
0
answers

Create a query view

I would like you to help me with a little doubt that I have, I need to create a view query, where I show the total sum of income for the leases in the months that I want to see, I did this but I do not know if it will work as I want CREATE VIE...
asked by 24.12.2018 / 04:13