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...
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...
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 (...
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...
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...
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...
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...
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
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...
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...