0
votes
1answer
21 views

PG syntax error

I've been trying to convert the fedena project built on ruby on rails for my school from mySQL to postgreSQL for heroku deployment and ran into the following error: Showing ...
0
votes
1answer
23 views

PostgreSQL -Loop with query - error

I'm new with PostgreSQL; I used to work with Toad for Oracle. I run the following code and can't make it work. begin for prueba in (select * from a_userid) loop update a_userid set user_id2 = ...
2
votes
1answer
24 views

Array aggregation for all columns in a table in Postgres

WITH Dept(DName, HeadCount) AS ( VALUES ('D1', 5), ('D2', 6), ('D3', 7) ) Select array_agg(DName), array_agg(HeadCount) from Dept The above query will yield. "{D1,D2,D3}";"{5,6,7}" Is there ...
0
votes
1answer
22 views

PostgreSQL clever use of ST_Within

maybe my question can seem stupid, but I'd like to ask if somebody can tell me how can I improve this query: UPDATE twitter SET poi=poi.type_name FROM poi WHERE ST_Within ...
1
vote
3answers
33 views

Postgres selecting only columns that meet a condition

If I have a database table t1 that has the following data: How can I select just those columns that contain the term "false" a | b | c | d ------+-------+------+------ 1 | 2 | ...
0
votes
0answers
19 views

Table design to upload files

I have a design question. In our project we are giving the users of our website the ability to upload csv files to our database. The problem that we are facing now is how to mitigate the concurrency ...
2
votes
1answer
30 views

Combining Multiple Columns from the Same Table Into 1 Longer Unique Column?

Data Source: http://www-01.sil.org/iso639-3/iso-639-3_20130520.tab So I have a table like this (abbreviated from the actual table): Part3 Part2B Part2T Part1 Scope Type Name Comment ...
-1
votes
0answers
26 views

select query in postgresql for display the data like target using source table [closed]

My Scneario is How to get this target table using query? Can anyone please help me in designing the query. My source example is : empno,ename,sal 1,aaaa,100 2,bbbb,200 3,cccc,300 3,cccc,400 My ...
0
votes
2answers
27 views

postgres query with current_date is not working

Below is my query in postgres select dns_time,update_time from dns_lookup where update_time=current_date; Here update_time is of type timestamp with time zone. I have tried this one also. select ...
1
vote
2answers
42 views

What is an Efficient Way to do an AND/OR Search Django-Postgres App?

In my Django app I have a Publication model and a Tag model which have a many to many relationship. Let's say I have four tags: men, women, fashion, design. I want to find all publications that have ...
-3
votes
1answer
28 views

Is sysdate not supported in postgresql [closed]

I want to perform a query using sysdate like "select up_time from exam where up_time like sysdate" Is postgresql support sysdate.I did not find sysdate in postgres doc.Please help me
0
votes
0answers
17 views

Determination of the reasons of omission of request

There is a procedure reading from a database of value and writing data in ArrayLists which also register in files. As a result of program execution debug files are empty. Prompt in what business. As I ...
-2
votes
3answers
60 views

How to insert into table in Postgres?

INSERT INTO HMS_RESERVE_CANCEL_DTL (DIVISION_CODE, UNIT_CODE, RESERVATION_NO, RESERVATION_DATE, CANCELLATION_NO, CANCELLATION_DATE, CANCELLED_AT_UNIT, ...
0
votes
2answers
45 views

postgresql index on string column

Say, I have a table ResidentInfo, and in this table I have unique constraints HomeAddress, which is VARCHAR type. For future query, I gonna add an index on this column. The query will only have ...
1
vote
1answer
35 views

How to get distinct sums when summing over repeated values?

The issue I am having is with Postgres, in that using SUM with non-unique values or "sales" results in non-unique cumulative sums or "running sales". Here is the query: SELECT *, SUM(Sales) ...

1 2 3 4 5 49
15 30 50 per page