Questions tagged as 'sql-server'

1
answer

ASP MVC 4 and WebService

I have a WebService with all the methods I need to make the system work, and I also have a ASP NET MVC 4 page. I have already made the reference in the services references of the WebService. I am trying to use a webservice method which re...
asked by 10.04.2014 / 02:22
0
answers

Generic Repository with Dapper

I'm doing a test application where I want to see the performance and learn how to create a generic repository with Dapper, well I have some experience when I created a generic repository, but using EF6, trying to use the same logic made the cons...
asked by 13.12.2018 / 21:34
1
answer

Error executing the 'bcp' command within a procedure

When I run the command: DECLARE @cmd varchar(1000); SET @cmd = 'bcp "select [colunas] FROM [usuario].dbo.[tabela] " queryout "\***\SQLServer\text.txt" -c -UTF8 -T -S***'; EXEC xp_cmdshell @cmd; It works. But when I run the same command insi...
asked by 28.05.2014 / 20:35
0
answers

How to avoid database locking using EntityFramework Transaction

I have a method where I save several classes and call another method to do an optimization on top of these classes, however I am using Transaction , in case something wrong in this optimization I need to give rollback . Transaction...
asked by 10.11.2018 / 20:43
1
answer

Can the automatically generated .mdf database in App_Data be used in production?

Can the database automatically generated within the App_Data folder in projects Asp.Net MVC and Web-Api be used in production or is it a test-only basis?     
asked by 15.07.2014 / 13:45
1
answer

Add result of another sum

I'm trying to make a sum of the result of another operation. Below is the code I'm trying to do select distinct (SELECT(SUM(CAST(ROUND(ppre.Valor_Custo, 2) as decimal(18,2))) )) * (select isnull(sum(case when e.Quantidade &...
asked by 19.09.2018 / 15:24
0
answers

Deadlock with SQL SERVER PROCEDURE

I need to generate a game table for four groups with 5 teams, for each day a total of games must be performed, at the time the PROCEDURE that performs the insertion starts is called the bank goes in loop, someone knows where is the error?...
asked by 18.09.2018 / 00:44
1
answer

Select with subquery to pick up previous record

I have a structure of records of user readings by reference. According to data below. SELECT L.LeituraID, L.UsuarioID, L.Referencia, L.Leitura FROM Leituras AS L |-----------|-----------|------------|---------| | LeituraID | UsuarioID | Refe...
asked by 21.11.2018 / 18:28
2
answers

How to open a report file in RDF format?

I was sent a report with the .rdf extension. The system that generated this report uses MS SQL Server 2008 as the DBMS. I would like to know how to view and manipulate the information in this file.     
asked by 29.01.2014 / 20:36
0
answers

Get Directory and number in a string in an irregular expression

I have a table that has all the address in a single column, but it is irregular. Here are some of the following: BR 459 KM 153 RODOVIA ITAJUBA MF KM 05 Rodovia MG353 2Km 55 RUA 37 QUADRA 4 LOJA 611 E 1621 Rua 13 de Maio 71C RUA 106 Nº07 RUA...
asked by 14.05.2018 / 20:25