Questions tagged as 'sql'

1
answer

Subquery SQL DB2

I am trying to make a subquery (in a particular column) within the base query. The code is as follows. select z.po_id, max(SELECT etcdc.ship_evnt_tms from COVINFOS.SHIPMENT_EVENT etcdc where etcdc.SHIP_EVNT_CD = '9P' and etcdc.ship_id=scdc.sh...
asked by 17.04.2018 / 19:48
1
answer

Error opening a database in SQL Server 2008

I do not know what the following error should be: USE BD_INVENTARIO GO Mens. 945, Nivel 14, Estado 2, Línea 1 No se puede abrir la base de datos 'BD_INVENTARIO', porque no es posible tener acceso a archivos, o la memoria o el espacio en disco...
asked by 17.04.2018 / 17:10
0
answers

VB.NET NOT RECOGNIZING CHARACTER FROM SQL

Good morning everyone, I'm trying to download teradata information with a select statement, the problem is that when I do it in vb through code some of the characters in the result in the recordset contain accents and are not recognized, for exa...
asked by 23.04.2018 / 16:25
0
answers

How can I combine old / new with a variable in postgres?

I'm doing as a type of blog, and I'm trying to save the record id the table that triggers my function. There are two tables, customers and orders, I want that if customers shoot my function, I saved the customerid that was inserted, modified or...
asked by 16.04.2018 / 06:38
1
answer

Autocomplete html sql form

Well, I'm creating a system for the control of dining rooms, I'm really new to this, however I like to learn, I explain my problem I have a bar code reader reads a "card" and inserts the code into an input , I would like that when reading the ca...
asked by 15.04.2018 / 23:19
1
answer

Error connecting crystal reports with server

Good I'm doing an application in visual basic 2017 that connects to SQL, the problem comes when I run the .exe on the client's machine and I want to generate a report Note that the program is connected to the database that is on the server perfe...
asked by 17.04.2018 / 01:58
1
answer

how to create a SQL table with dynamic columns

How can I make a dynamic SP where according to the data of a table1 I take them as columns to create a table2 these may vary . That is to say how there can be 1 or 2 there can be 10,20,30 ... I leave a SP to create a table CREATE PR...
asked by 13.04.2018 / 19:40
0
answers

Error executing trigger after insert

Trigger:    INSERT INTO payments SET identrada = NEW.id, idusuario = NEW.idusuario,   idcuenta = NEW.idcuenta, payment = 0, description = 'Entrada', sinpagar =   0, form = 'S / P', time = NEW.hour, date = NEW.date, postdate = NEW.date My...
asked by 21.04.2018 / 18:43
3
answers

Error in stored process of adding

Hello, how am I trying to perform a process stored in my sql database to add to my table Clientes This is the stored process that I am using: CREATE PROCEDURE agregarClientes(Codigo int, Nombre varchar(15), Apellido varchar(30), Dire...
asked by 13.04.2018 / 02:51
1
answer

How to know if a model has 0 relations. Rails

I have a question about how to optimize a query, I'm doing it with a select to an active record query. How could I do this in a single SQL query. Here, for example, is a request. maintenance_service_requests has a Has and belong to many with...
asked by 12.04.2018 / 00:35