Questions tagged as 'postgresql'

2
answers

Insert data of timestamp type in PostgreSQL database

How can I insert the date and time in a PostgreSQL database where the field is of type timestamp ? I tried the following query in PostgreSQL , but it gives an error that the date is not compatible with timestamp : Code: insert into...
asked by 05.05.2017 / 06:22
1
answer

Problem when making inquiries in psycopg2

good day I'm working on a project where I need to consult different databases and for that I use the psycopg2 extension of python, however at the time of making a query it only shows me the first data of it , despite the fact that there is a lot...
asked by 03.05.2017 / 22:37
2
answers

Problem with consultation in postgresql crosstab

Good day, I have a postgresql query but I need to modify its structure from columns to rows: select anno, SUM(total_sales) as sumas, sexo_ from sivigila_a where cod_event = 110 GROUP BY anno, sexo_ ORDER BY 1 the result is t...
asked by 05.05.2017 / 18:46
1
answer

How to use the LIKE as a parameter in a function in postgres

Hello everyone, I am trying to pass a query that I use regularly to a function but I run into problems to create it. What I have so far is the following CREATE OR REPLACE FUNCTION "public"."prueba" (in regional varchar, in fecha date) RETURNS...
asked by 10.04.2017 / 22:31
1
answer

Exceptions in plpgsql

see, I have this code in plpgsql: CREATE OR REPLACE FUNCTION edatAlumne(int id_alumn) RETURNS int AS $$ DECLARE edat integer; BEGIN select extract(year from age(current_date, naixement)) into edat f...
asked by 22.03.2017 / 18:27
2
answers

Error trying to enter a date in a "date" column in the database

I have a column type date and I try to insert a date but it throws me the following error: Invalid parameter value: 7 ERROR: the time zone «gmt-0400» is not recognized (SQL: insert into "lots" ("number", "id_products", "date", "id_turn...
asked by 07.03.2017 / 19:48
1
answer

Connect PHP linux to a database hosted on the windows (DB POSTGRESQL)?

I'm doing a project php in windows with a database engine POSTGRESQL , to test the correct operation I had to pass the project to linux (virutalbox~ubuntu) the problem is that I do not know how to connect to the databa...
asked by 22.02.2017 / 14:37
1
answer

How to do filtering on datatables ignoring uppercase and lowercase?

I have a table made with server-side datatables but at the time of filtering, eg: "ing" ignores that "Engineer" exists, that is, it takes into account the case. How can I avoid that? Here is the code of my table: var table = $('#table').D...
asked by 09.01.2017 / 21:33
1
answer

SQL Statement Does Not Throw the Data Needed

I have a sentence that does not work for me in the right way, Areas of medicine: Clinical analyzes. Pathological anatomy. List item. Anesthesia and resuscitation, among others. What I need is for me to select the one.    Speci...
asked by 24.01.2017 / 15:26
1
answer

reports c # and postrgres

Good evening in advance thank you very much for any contribution, I'm doing a project and at the time of making the reports I stumble with Npgsql not link to the ReportViewer any suggestions? or maybe a editor of reports defirentes...
asked by 24.10.2016 / 09:46