Questions tagged as 'sql-server'

1
answer

Reuse stored procedure sql server

I'm trying to reuse the result of a procedure so I do not call it twice again, because it takes too long to do so. select DW.dbo.procedimiento(CONVERT(char(10), FecLlamada, 103), CONVERT(char(5), HorLlamada, 108)...
asked by 18.12.2017 / 17:38
1
answer

Consult xml file from sql server with OPENROWSET

I'm doing a query to an xml file from a store procedure and when placing the direct route it works. the problem is that the route I want to pass it by parameters and throws me error when placed as variable DECLARE @XmlFile XML SELECT @XmlFile...
asked by 18.12.2017 / 14:04
1
answer

SQL Bring top 1 or max

I have the following query: select top 1 fact.vend, fact.cliente, sum((detalle.precio-art.costo)*cant) as total from afacturas as fact inner join afacart as detalle on fact.comprob = detalle.comprob inner join aarticulos as art on detalle.cor...
asked by 26.11.2017 / 16:44
1
answer

Get the records that have been updated

good day. I have the following case: I need to get the newest records from a series of records. Let me explain, I have a table of Appointments Histories for a doctor, in this table are stored the hours of the appointments "Original Appointment T...
asked by 05.01.2018 / 05:05
1
answer

How can I export data from a table separated by; instead of,

Hello, I am trying to export a table but automatically exporting it as a field terminator ',' and what I would like to follow is that the field separator is ';'. For this I am using a stored procedure. What I get is: Part_Number, Too...
asked by 05.01.2018 / 07:16
1
answer

How do I insert an excel in a sql server table without inserting repeated data in the table?

someone could help me with something that has been stuck for some days, what happens is that I have to insert the records of a document in excel in a table in sql server, but I have to verify that the records that I insert, do not repeat with th...
asked by 03.01.2018 / 23:43
1
answer

Store file in SQl Server 2008 database AJAX C # ASP.NET

I am developing this part of a page where I need to save a file (.xls, .docx, .png, etc) on a SQl Server basis, too I need to get the properties of this file as its name, type, size; I think I almost have it, but I still get this error from...
asked by 01.11.2017 / 19:17
1
answer

Problem with query

I have the following problem, I want the column Months to stop repeating, and the column Qty is added, but the table is the result of a query, I leave the query and the result table as an example: select DateName(month,date_esti...
asked by 03.11.2017 / 21:14
2
answers

Error in dates in laravel 5.5 and SQLServer

Inserting any date in laravel 5.5 into a SQLserver database gives me the following error: SQLSTATE[22003]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server] Error de desbordamiento aritmético al convertir expression al tipo de datos datet...
asked by 24.10.2017 / 18:45
1
answer

How to know if a stored procedure that is executed within another procedure, returns an error, exception or empty from C #?

In this code I show only one (EXAMPLE) where I have a Stored Procedure and within it I get data from another Procedure, How can I capture the value that returns this procedure or the output values (sp_SearchTurn) before getting the one that re...
asked by 11.12.2017 / 20:48