1
vote
1answer
26 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
25 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
23 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
38 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
26 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
55 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
42 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
33 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
vote
3answers
43 views

How can I optimize this SQL query in Postgres?

I've got a pretty large table with nearly 1 million rows and some of the queries are taking a long time (over a minute). Here is one that's giving me a particularly hard time... EXPLAIN ANALYZE ...
0
votes
1answer
42 views

php variable in query - postgresql

I have problem with query value. This is working. $userArray = $database->select("app", "fb_id=14175962160"); but this isn't working. WHY? $user = $facebook->getUser(); // contains my fb id ...
1
vote
3answers
78 views

Quite a tricky SQL query

I have the table EMPLOYEE with 3 fields: EMPLOYEE(ROLE SMALLINT, RATING INTEGER, NAME VARCHAR) I need get from this table only 3 row. It's One row of each type with the highest rating in its type. ...
-1
votes
1answer
44 views

Postgresql Dynamic SQL Query [closed]

I need create this query dynamically: INSERT INTO "calle" (a, b, c, d) SELECT l.id_localidad, v.tipovial, v.nomvial, v.geom FROM "010010001v" AS v, dblink('dbname=xxx port=xxxx host=xxxxx user=xxx ...
0
votes
1answer
28 views

How to split value with new line in Postgres?

I had a table name BookInfo id / book_name / description 1 / book 1 / harry potter Part 2 How can I split between new line (harry \n potter \n Part 2 ) ...
3
votes
2answers
39 views

How to detect if value have new line \n in Postgres

Example I have table name: bookInfo values id / book_name / description 1 / book 1 / dummy 2 / book 2 / harry potter Part 2 In id 2 description have a newline ...

1 2 3 4 5 48
15 30 50 per page