Questions tagged as 'sql'

1
answer

Inner Join Sql for a query of two tables

Hello friends I'm trying to make a query where I get elements from different tables, in this case, it's only for 2, I guess I can use a Inner Join but from what I understand this I It serves to relate tables. This is more or less what I want ....
asked by 18.06.2018 / 18:58
2
answers

Multiple data in where variables in SQL

Well, I'll tell you a little bit. I have a query in SQL like the following > SELECT * FROM TABLA WHERE Priority <> 'P1' AND Region = ISNULL(@Region,Region) AND PM_Name = ISNULL(@PM,PM_Name) AND Priority = ISNULL(@Priority, Priority)...
asked by 21.11.2018 / 16:16
1
answer

Query oracle group

I have the following tables: Students id nombre 1 Lucas Exams id fecha nota alumno_id 1 25/11/2018 5 1 2 26/11/2018 8 1 I need with a query, to extract the last note of the student according to his d...
asked by 26.11.2018 / 14:01
1
answer

Do not query DB SQL

I'm doing a project, in most cases the consultations are    they perform normally and correctly, but on 2 occasions (one of them is)    he performs the query, he tries to print the query and nothing happens.      $mysqli = new mysqli("localhos...
asked by 21.06.2018 / 12:01
1
answer

insert data at the start in a field already created in sql

can help me by indicating how the data update is done at the beginning of a field already created in SQL, for example: telefono 323890988 247639087 For the fields of the telephone table I need to add at the beginning of each of them the va...
asked by 31.05.2018 / 03:25
2
answers

Multiply an alias with a field in SQL

I have this query and I need to multiply SI_Dif * m.SI_Costo_Promedio but it tells me that SI_Dif is not valid. SELECT t.SI_Articulo, m.SI_Descripcion, t.SI_UM, (CASE WHEN c.SI_OV IS NOT NULL THEN '*' ELSE NULL END) AS SI_OV,...
asked by 23.06.2017 / 18:55
1
answer

Consultation with join brings me more records than expected

I need to make a join between 2 tables, I have the person table which contains 58422 records, and I have the evaluation table which contains 59175 records what I need is that it only brings me to join the total of the person table and not that o...
asked by 08.05.2018 / 16:15
1
answer

Update field of two sql server tables

I present the following concern, I need to make an update of the initial amount in the article table, brought from the table articulo18abril as a condition I have established that if they have the same id is assigned the amount that corresponds...
asked by 19.04.2018 / 23:17
1
answer

Make a SUM with codeigniter

I need to add the detail table data the problem esque does not contain the date if not in the main table, it made it very easy in the following way: Model: $this->db->select('COALESCE(SUM(cajas),0) as total_cajas, COALESCE(SUM(peso),0) a...
asked by 22.04.2018 / 09:40
2
answers

It is not sent to call java method, help!

Hello good morning to all, today I am trying a java method and the problem is that it is not sent to call, it is a hashMap this is the original code that was "hard code" and then changed dynamically by means of a SQL query within a method, this...
asked by 27.04.2018 / 18:36