Questions tagged as 'sql-server'

1
answer

Inserting data into db sql server

I am having problems connecting my project to the database, I do not understand the reason, I have already looked at several tutorials, I use sql server 2017, I can access db in an application, but the site is not working. I'musingthefollowingc...
asked by 19.10.2017 / 00:50
2
answers

Join returning many records

Hello, I have already researched this error and I did not see any that fit my problem, so my problem is that I have two tables, I need to get some information from table B and insert it into the query next to table A, such as in table A I have i...
asked by 29.09.2017 / 14:20
1
answer

How to return a table from the xml in sql server

My xml looks like this: <Operacao Id="1"> <Contatos> <Contato Id="2013"> <Emails> <Email Id="40"/> <Email Id="41"/> </Emails> </Contato> <Contato Id="...
asked by 28.09.2017 / 19:30
1
answer

When clicking the check button if the value of the textbox contains in a table column

How can I make a textbox check if it contains this value inside the table in the DataBase column when I click the button? I made this code, but I did not succeed: SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStri...
asked by 25.09.2017 / 13:35
1
answer

Compare values in group by sql server

Something very unusual happened in my bank. Some records have been entered more than once (7-13) to be more accurate. This was due to a software error that has already been resolved. Now I need to delete duplicate records, but I have the foll...
asked by 09.10.2017 / 22:00
1
answer

Haversine formula for SQL SERVER

Well, I have an Android app that uses Google Maps API. On the map, I get data from a SQL Server database. I need to create a radius in KM in which I just load the data from the bank that are within this radius. This is based on the current geolo...
asked by 08.09.2017 / 03:14
1
answer

TRANSACTION - How to correct a transport error?

I think you can understand what I'm trying to do there: This method will make a foreach for each item in my list of moves, and send each one as a parameter to the method that will save them in the DB. I need to use a Transaction to ens...
asked by 27.09.2017 / 07:18
1
answer

SQL Server 2012 Query - Query

I'm having a hard time. In the query below, you're bringing it that way. Tarefa_Inclusao Tarefa 167909 167920 SELECT TarIDInclusao [Tarefa_Inclusao],tarid [Tarefa] FROM Tarefa WHERE TarID = 167920. In this query is a...
asked by 26.09.2017 / 16:02
2
answers

Parallelism in Sql Server with C #

I'm implementing async methods in C # and would like to know how to proceed when I get into Sql. When I open a connection to the sql server, does it allow me to parallelize only one connection? That is, can I send several queries to him that...
asked by 21.08.2017 / 18:09
2
answers

select multiple columns group by 1 column

I have a table with 300mil records and inside it there are several different fields, I would like to take the line that contains the largest DATAEMISSAAPURADA for each CPF_1 What I have: ID NUMERO DATAEMISSAOAPUR...
asked by 14.08.2017 / 20:01