Questions tagged as 'sql-server'

0
answers

How to export a sql server table with your data to xml

hello I have a table in sql server which I must export it to xml and I'm doing it but I do not export it in the format I want, I'm trying the following: string select = "select * from TEMPTABLE FOR XML AUTO, XMLDATA"; XmlDocument xmlDoc; va...
asked by 31.05.2018 / 03:27
1
answer

Problems with windows update sql server 2016

Thanks for the help you can give me. I have a Windows Server 2016 virtual machine and it has installed SQL server 2016, the problem is presented when running the Windows update always shows me that the Security Update update for SQL Server 2016...
asked by 28.05.2018 / 13:54
0
answers

Flow control in a user-defined function

I have created a function that responds to the following code: -- Pasando un numero de departamento, obtener los empleados de este y su id. CREATE FUNCTION F_Emp_NumEmp (@NumDe NUMERIC(3)) RETURNS TABLE AS RETURN (...
asked by 28.05.2018 / 15:11
1
answer

SELECT in SQL Server last week

Hi, I would like to do a SELECT of SQL server but only select me the last days from Monday to Sunday. NOT the last 7 days would be something like this: select GETDATE() - 7 but in that only I get the last 7 days but I want to start from Mon...
asked by 30.05.2018 / 06:40
0
answers

I wanted to know if I was wrong in creating the USP ConsultBook or in business entities

   When I want to update a book, the combobox of the Book goes blank (supposedly I should leave with the data of the book) but when I display the list of authors, categories, etc, and when I change the year of publication or Title of the book I...
asked by 30.05.2018 / 19:37
0
answers

Merge two rows in a query

I have my query that shows me my data in this way select Nombre, Deporte, sum(Ganar), sum(perder) from Tabla where CodPersona = 777 group by Nombre, deporte the query shows me the sums of the two sports and repeats t...
asked by 24.05.2018 / 22:46
1
answer

Upload an excel to visual studio and pass it to sql server

I have a project to which I need to upload files. I have to upload an excel file, select the file from the computer and pass it to a sql server database. I have tried with tools such as sql server data tools, but apparently it only allows me to...
asked by 24.05.2018 / 15:04
1
answer

How to make a count from a stored procedure and insert them into a table?

Good day I am looking for how to make a count from a stored procedure and that the result is inserted in a table, how to do the count but I do not know how to do it from a stored. SELECT COUNT (User) AS Count from tbl_Ansignations     
asked by 23.05.2018 / 15:12
2
answers

discriminatory query sql server

I have a query: select tbAfiliado.id,tbAfiliado.nombre, tbPrograma.nombre_programa from tbAfiliado inner join tbPrograma on tbAfiliado.id_programa=tbPrograma.id where tbAfiliado.id=15 which returns me several rows: 1-carlos-fi 2-j...
asked by 17.05.2018 / 18:43
1
answer

SQL server dateadd

In sql server I have to create a new column in a preexisting table where I add another column that I have with seconds to the new one from a date: alter table Emails add Date smalldatetime ALTER TABLE Emails ALTER COLUMN Date DATEADD('SECOND...
asked by 17.05.2018 / 20:30