Questions tagged as 'postgresql'

1
answer

Group By, and create new columns for the PostgreSQL result

I have the following problem: I have my table access In this table I relate the Role with a Module and the Permission it has. What I want is to create a view that returns the data to me in the following way: View returning th...
asked by 23.05.2018 / 23:28
1
answer

What can be done to simulate a MS SQL try catch but in PostgreSQL?

What can be done to simulate a Microsoft SQL Server try catch but in PostgreSQL? BEGIN TRY BEGIN TRANSACTION IF EXISTS (SELECT * FROM USUARIOS WHERE ID_USUARIO = @ID_RESPONSABLE) BEGIN DECLARE @ID_CLIE...
asked by 20.04.2018 / 23:43
1
answer

Display information of a binary search tree python

In a class, I have a method where I call my binary tree module (do not pay attention to the name of the treeAVL) and I save the information that I take from the database: def ingresarArbol(self): arbol=ArbolAVL.ArbolBinarioBusqueda...
asked by 06.03.2018 / 04:33
1
answer

Problem with the Connection to BD Postgresql with python

import psycopg2 class BaseDeDatos: def _init_(self): try: self.conexion=psycopg2.connect( "host='localhost' port='5432' dbname='Inversiones' user='postgres' password='xxxxxx'") self.conex...
asked by 18.02.2018 / 04:12
1
answer

Conflict of operand types: time is incompatible with numeric sqlserver

I'm doing a stored procedure to add a sale but I do not have this error Conflict of operand types: time is incompatible with numeric This Code is the same CREATE procedure agregarventa( @idusuario int, @idcliente int, @fecha date,...
asked by 01.04.2018 / 06:54
1
answer

Subtract two sql columns

I have a table in postgresql, the structure is as follows: clientes --------------------- nombre apellido pago deuda saldo pendiente The point is that I want to subtract the fields pago - deuda and the result that appears in s...
asked by 25.05.2018 / 01:09
2
answers

Get the columns that are part of a PostgreSQL table

I need to get the name of the columns that make up a table in postgres, to perform an advanced search according to the selection of columns that the user selects. Is there a query to get the names of the columns of a table in PostgreSQL?  ...
asked by 20.06.2017 / 22:38
1
answer

I have a problem in a postgresql query

I want to do a filtering by ID number but this is a numeric type and the like does not accept it as I can do? the query is this "SELECT * FROM cliente WHERE identif LIKE '_%'"; where identif is of type numeric     
asked by 21.12.2016 / 01:38
1
answer

Trigger to auto-insert values in a table

I'm new to projecting databases. I have 3 tables: users: +--------+--------+---------+----------+--------+ | userid | name | surname | password | admin | +--------+--------+---------+----------+--------+ | value1 | value2 | value3...
asked by 18.11.2018 / 18:49
2
answers

Nested lists in Laravel 5.5

I'm working on laravel 5.5 I have these two lists: 1- The first is a list of operating systems {!! Form::mySelect('id_so', 'Sistema Operativo', App\SistemasOperativos::pluck('nombre', 'id')->toArray(), null, ['class'=>'chosen', 'pl...
asked by 22.08.2018 / 19:55