Questions tagged as 'sql-server'

4
answers

Error of variables declared in a stored procedure

I have this procedure that I use to choose between one type of user or another for a login window, I get syntax error but I can not find the logic failure. SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE Sp_Login -- Add the...
asked by 21.09.2017 / 11:14
1
answer

Connecting to different OLE DB origins in SSIS

For several days now I am trying to make a connection to the BDD through the OLE DB wizard in Sql Server Integration Services. What I need is to be able to connect to different servers to be able to do the same query but in all the servers at th...
asked by 24.08.2017 / 16:55
3
answers

how to transpose columns and hide row?

the code I'm using: select ccc.Descripcion AS Grado, p.CodPersona AS Codigo, p.NombreCompleto AS Nombre, cc.Detalle AS Detalle, SUM(cc.Valor) AS Valor from Cuenta cc inner join AlumnoDB.dbo.Alumno a on cc.IdAlumn...
asked by 25.09.2017 / 16:49
1
answer

Trigger to subtract dates

Hello colleagues I have this query that works well to find the difference between two dates in days, hours, minutes and seconds but when I pass it to the trigger it does not work anymore I get a number 4873 I do not know what I'm doing wrong, my...
asked by 05.07.2017 / 16:20
2
answers

Sum of times sql server

I want to do a triggers query in SQL Server for the following: A calculated field my column subtracts is the difference between two dates and I want the total column to make me the sum of those differences plus the difference of the previous...
asked by 05.07.2017 / 18:47
2
answers

Clear data every so often

I have a table created in SQL Server which has the following data: CREATE TABLE [dbo].[LogData]( [id] [int] IDENTITY(1,1) NOT NULL, [fechahora] [text] NULL, [descripcion] [text] NULL, [servidor] [text] NULL, [horaCaptura] [...
asked by 18.07.2017 / 19:31
1
answer

How to create a self-build DateTime field for 30 Minutes SQL Server?

I try to create a table that serves as a control for several tables whose structure is based on a day (24 hours) divided into 30 minute intervals. In another table I have a list of activities, these last 30 minutes each. The point is that 2 a...
asked by 09.07.2017 / 15:37
1
answer

AJAX error when sending data with files

Hello, I am trying to upload a file from exel to a database / SQL SERVER 2008 through AJAX . But I have a problem with the file when I send the data ... at this moment I have not managed to mount the file in the query to execute it, on the...
asked by 10.11.2017 / 22:51
2
answers

Count in sql query

I'm trying to count the number of locations (SELECT COUNT(t.SI_Ubicacion)) AS cantidad, 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, (SELECT COUNT(t.SI_Ubicacion)...
asked by 27.06.2017 / 17:00
2
answers

Error doing Left Join. The identifier consisting of several parts ... could not be linked

First of all, explain what I am trying to do so that you understand my problem. I am developing a web platform based on PHP to perform the maintenance of the different types of equipment that may be in an empesa (High, low and modification there...
asked by 18.05.2017 / 11:08