Questions tagged as 'sql'

1
answer

Sort values of the columns from largest to smallest in an array and save each ordered value in a new variable

The data in the blue box exists, the data in the red box must be registered, It is to order the (data from the blue box) from largest to smallest and pass them to the column of the red box, according to their order. What I have done...
asked by 30.07.2018 / 23:13
1
answer

FULL OUTER JOIN does not throw me NULLs where the key has no match (SQL Server)

I have two tables, as an example, TABLE1: Cuenta Fecha Valor 1 201801 a 1 201802 b 1 201803 c 1 201804 d 2 201801 f 2 201802 g 2 201803 h and TABLE2...
asked by 27.07.2018 / 18:27
1
answer

concatenate the same column in consultation?

First of all I am sorry for knowing how to use all the available tools .. I will try to teach them as I can .. I have this query: Nombre Clase Raza Contexto Lazaro Burlón Humano Lazaro es un ... Lazaro Barbaro...
asked by 02.07.2018 / 22:06
1
answer

set variable Query dynamic

Set variable within a dynamic query and for each database obtain the user result with the role 'db_owner' and represent them in '1' if you find results and '0' if you do not find. BEGIN DECLARE @baseDeDatos VARCHAR(50)...
asked by 04.07.2018 / 16:55
1
answer

Error UPDATING Duplicate entry '1' for key 'PRIMARY'

I'm trying to update a record in the database and I get this error: <h1>A Database Error Occurred</h1> <p>Error Number: 1062</p> <p>Duplicate entry '1' for key 'PRIMARY'</p> <p>UPDATE 'compra'...
asked by 28.06.2018 / 15:28
2
answers

how to call a name with duplicate condition Oracle sql?

I am a bit confused when trying to construct a query that brings the Names (from the ENAME column) of all the employees (from the employees table) that were not registered in the JAVA course (from the table registrations). the column attendee is...
asked by 29.06.2018 / 00:18
1
answer

SQL query in EntityFramework

I want to do manual sql queries but using the .net entity framework. ex: select from database where id == 20 ; and no: Item algo = new Item(); algo.name = algo.lastName = algo.Add(); understand me ????     
asked by 20.06.2018 / 20:58
1
answer

Help ORACLE Queries

List the department, the total salary of the departments that the sum of their salary is greater than 20000. SELECT D.DEPARTMENT_NAME,SUM(E.SALARY) FROM DEPARTMENTS DINNER JOIN EMPLOYEES E ON D.DEPARTMENT_ID=E.DEPARTMENT_ID GROUP BY D.DEPART...
asked by 20.06.2018 / 16:35
1
answer

Problem with SQL statement when wanting to group (Group By)

The problem lies in the moment in which I want to execute the following sentence: SELECT Id_Temporada, IdSerie, NombreTemporada, NumeroTemporada, Id_TemporadaC, Id_CapituloT, NombreCapitulo, NumeroCapitulo, DescripcionCapitulo...
asked by 21.06.2018 / 20:49
2
answers

SQL query in Laravel

How can I pass the following query in Laravel 5.4 SELECT CONCAT( TRIM(SUBSTRING(NombreCliente,1,1)), TRIM(SUBSTRING(NombreCliente, locate( ' ',NombreCliente), 2) ) )INICIALES FROM 'cliente'     
asked by 14.06.2018 / 22:49