Questions tagged as 'sql-server'

1
answer

Convert SqlDataReader in Generic List

I have a SqlDataReader in a method and I need to return it, the problem is that when closing the SQL connection the data of SqlDataReader disappears, to what kind of data should I be able to pass it to return it ?, this is my code static publi...
asked by 06.02.2017 / 16:37
1
answer

Create table with UNION

I have this query in Access that I have to pass to SQL Server INSERT INTO Out_MTK ( Id_MTK, Fijo1, Fijo2) SELECT Aux_Mtk_Red_Familia.Expr1, Aux_Mtk_Red_Familia.Fijo1, Aux_Mtk_Red_Familia.Fijo2 FROM Aux_Mtk_Red_Familia The pro...
asked by 14.02.2017 / 16:27
1
answer

Trigger in SQL to send email

I need to create a trigger in an SQL table to send an email if the inserted record meets certain conditions. That is, I create the trigger in Tabla1 to send an email to X if in the inserted register the IdCircuito= 53...
asked by 02.02.2017 / 18:58
1
answer

How to call a Store Procedure that returns a list of data in the Entity Framework Code First?

I need to show a list in a DataGridView but due to the complexity of the SQL query I prefer not to use Lin-Q so I create a stored procedure but since I use the Entity Framework I do not want to call using SQLConnection but from DbContext.     
asked by 09.01.2017 / 02:12
3
answers

Duplicate records in query using SQL Server

I want the month to show the field EstadoMateria of the table AlumnoMateria without duplicate records and the ones that are not showing anything, as is done in the expected result photo. This is the result query obtained (which...
asked by 06.01.2017 / 22:59
2
answers

Error converting nvarchar data type to date - SQL Server

I am generating a cross table where I show the operators and every day of the week with the number of tickets they attended per day, in this case I am creating a function that receives a date parameter and calculates each day of the week for so...
asked by 11.01.2017 / 00:54
1
answer

How to make an SQL server select that only takes

I have in a table SQL server PosZ column PosZ 103.111005555 1.55689866 95.3655523 SELECT PosZ FROM Table My question is how do I get only the first number before the Point (.) so that of this result: PosZ 103 1 95     
asked by 30.12.2016 / 20:46
1
answer

Error with SQL SERVER sequences

When trying to create a sequence in my database, I get an error. Then proceed to publish the script and the error of the query: create sequence seq_valorar start with 300 increment by 1 minvalue 300 no maxvalue no cycle; create sequence seq_...
asked by 05.12.2016 / 14:15
1
answer

error 40 sql server

good afternoon, I hope you can help me. I just switched machines because of technical failures in the other one and it tells me this in my project I was looking for error 40 but in general the Stdio management is the one that does not work...
asked by 10.12.2016 / 22:48
2
answers

Pass a VARBINARY to INT as a listing in sql

I have a database in which one of its columns is of type of data VARBINARY (MAX) and at the moment of making the query it brings me the data thus 0x7D7D7D7E7E80818182828384848483828281817F7F7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7 in a...
asked by 30.11.2016 / 18:19