Questions tagged as 'sql-server'

3
answers

query with columns of several tables using inner join

I have a table stock which brings me (among other things) the id of other tables, what I need is to make a query that instead of bringing the ID of the other tables, bring the name of the corresponding element to said Id. The diagram of t...
asked by 03.12.2018 / 22:24
1
answer

problem with rankeo on sql server

I have the following query SELECT em.id_empleado, p.des_familia, RANK() OVER(PARTITION BY p.des_familia ORDER BY sum(venta) DESC) AS RankByVentas, sum(venta) as venta, sum(unidades) as unidades FROM dim.empleado as em, fact.venta...
asked by 27.11.2018 / 14:06
1
answer

Error 233 sql server 2014

How can I solve this problem: try from server administrator     
asked by 24.10.2018 / 17:34
2
answers

You can use the name of a column as a condition in SQL Server

I am receiving some parameters that leave me the following query: I need to do a UPDATE in the column MONTO_ENE_18, is it possible that in my query the name of the column can be added so that I can do the UPDATE ?     
asked by 19.09.2018 / 18:39
1
answer

Error initial initial SQL Server SERVER BROWSER [closed]

after changing the name to my pc sqlServer stopped working, and when I try the sqlbrowser service initially I will not leave.     
asked by 30.06.2018 / 01:09
1
answer

Help with Sql Server queries

I have my following questions: SELECT T0.ItemCode as Codigo,T0.ItemName as Descripción, sum(Convert(int,A.VPiezas)) as Cantidad, sum(Convert(money, (A.VPiezas)))/sum(Convert(money,(A.VPiezas))) as PrecioU FROM OITM T0 INNER JOIN OITT T1 ON...
asked by 02.07.2018 / 20:34
1
answer

Change value of a Select field based on another table

The situation that I present is not explained well. But I have a table of matches with the following fields: Identificador , tipo de deporte , fecha , visitante and local . Visitor and local are type int...
asked by 19.07.2018 / 01:27
1
answer

a group of students can not use that classroom if it is already reserved at that time [duplicated]

I have a problem I do not know how to design the solution. A group of students can not use that classroom if it is already reserved at that time. For example, you can not assign a group to a classroom that is already occupied with a specific...
asked by 04.05.2018 / 09:30
2
answers

How to insert SQL with data from a Query?

I need to insert data into a table in another table. Basically I need to do this: INSERT INTO Consulta (tipo, busqueda1, resultado1, resultado2, resultado3) The value of the field tipo is defined by me, but the values of the other fi...
asked by 03.05.2018 / 22:25
2
answers

Delete records from one table if they do not exist in another

Friends good morning, I have the following problem. In my database I have two tables (HeadingsFacturas and DetalleFacturas) both are joined by an IDFactura. So for each invoice header, there is a detail that contains the invoiced transacti...
asked by 20.04.2018 / 19:46