Questions tagged as 'sql'

1
answer

How to make Google Chart work with SQL (Postgres)

Currently I want to make a query with a standing graph but I can not get it to show me the results, I'm not very versed in php so I guess it must be a beginner's mistake. This is my code: <?php //Invoco el archivo de conexion: in...
asked by 26.04.2018 / 16:39
1
answer

How to add values every time when entering data to the SQL database with C # and win forms

How to add values every time I insert the database and remember the Total values of previous inserts. I want to add field Name in Total field. And when I restart the application I want you to remember the last Total. This is my class clans co...
asked by 05.05.2018 / 16:57
1
answer

How to count names of dynamic registers in MySQL?

I have the following query SELECT ROOM_TYPE.type FROM ROOM_TYPE INNER JOIN ROOM ON ROOM.id_room_type = ROOM_TYPE.id that throws me the next result | TYPE | ---------- |sencilla | --------- |sencilla | ---------...
asked by 18.04.2018 / 17:46
1
answer

How to do an UPDATE correlated with conditions in PL SQL?

I have 2 tables: Table Solicitudes , with columns Id_cliente and No_cuenta_prestamo Table Disposiciones , with columns Id_cliente and Estado_Actual Subsequently I run the following code: ALT...
asked by 17.04.2018 / 21:27
3
answers

Concatenate values from the same field

I have a query that brings me this data, as you can see it brings me the same tasks because it has 2 users that handle it, I want you to help me concatenate it So that it is like this other and so reduce me the records that do not need...
asked by 10.04.2018 / 18:51
1
answer

Convert clause "In" sql to laravel 5.6

I need to be able to pass the following query Sql containing the clause "In" to eloquent in laravel 5.6 and that I could not perform. SELECT sum('monto_facturado') FROM 'peticiones' WHERE 'id_presupuesto' IN ( SELECT id...
asked by 07.05.2018 / 22:11
1
answer

Error Qt: QSqlQuery :: value: not positioned on a valid record

My problem is that when executing the following code: void MainWindow::on_loginButton_clicked() { QString userName = ui->userLineEdit->text(); QString userPassword = ui->passwordLineEdit->text(); QSqlQuery q; q.exec("SELEC...
asked by 05.04.2018 / 20:01
1
answer

Syntax error INSERT INTO OleDB

I am trying to launch the following code from a button and the error in the image jumps to me: Button code sCmd = "INSERT INTO Vendedores (Password,Grupo) VALUES ('151515',0)" GestionSql.Launch(sCmd) GestionSql.Launch code: (line 5...
asked by 02.05.2018 / 22:08
2
answers

NullPointer when executing a PreparedStatement

I am trying to generate a ArrayList of users from a DB , the case is that when executing the PreparedStatement it returns a NullPointer and it tells me that the connection object is null, it is something that does not...
asked by 16.04.2018 / 09:13
1
answer

Call to Case When (syntax)

I have the following query: select ic14.cantidad_recepcionada as recepcionados from comex_015 ic15 inner join comex_014 ic14 on ic15.invoice=ic14.invoice where ic14.codigo_producto='KO555581012EA40' and ic14.invoice !='0' group by i...
asked by 20.08.2018 / 17:20