Questions tagged as 'sql-server'

1
answer

Error when trying to insert DateTime.MinValue into the database

I have an object that has a DateTime property, and I initialize it with the value of the DateTime.MinValue property The problem is that passing this value to register in the SQL Server database gives an error:    SqlDateTime overflow. Must...
asked by 10.05.2017 / 16:55
2
answers

List table with ASP.NET MVC condition

I am studying ASP.NET MVC5, so I made a Model called 'ReportTagModels' containing: public class RelatorioTagModels { [Key] public int TagID { get; set; } [Required] public string Tag { get; set; } [Required] p...
asked by 18.02.2017 / 00:59
1
answer

Installing Visual Studio 2015 Community with SQL Server

I installed Visual Studio Community 2015 and wanted to connect it to SQL Server, but as far as I understand I do not need to install SQL Server, I just need to download SQL Server Data Tools. Is that right?     
asked by 29.10.2016 / 19:57
1
answer

How to calculate the distance between X and Y with points of Intersection

In the image above I have mapped the separation positions inside the warehouse where I work. I need to calculate the distance that the person who is separating goes through the warehouse. For example if the person is separating in position...
asked by 30.06.2016 / 14:59
2
answers

Exception with timestamp in the database

I want to separately insert the time and date into the database, which have the timestamp and data fields, respectively. And I have the following code to add the fields: sqlInsertCabecalho.Parameters.AddWithValue("@colaborador",...
asked by 22.04.2016 / 16:19
1
answer

Go line by row of a table

I have a temporary table that I fill in with the result of a given query. I need to move the data from this temporary table, line by line, and pick certain fields and insert them into another table, and in that other table, generate a coupon...
asked by 19.12.2016 / 20:40
3
answers

Database modeling, when it is possible to denormalize

I am modeling a database (MSSQL) and a question has arisen. In every customer business rule data is viewed vertically ex: Product, Original Price, Competitor Price01, Competitor Price02, Competitor Price03, Competitor Price04,...
asked by 11.01.2017 / 12:05
2
answers

How to do a select by date in C #?

I want to do a select by the current date, type: list all the data that was registered in my table today, I did it this way and it does not result in anything, it does not generate errors or list any of the information registered. //Método List...
asked by 03.04.2017 / 13:29
3
answers

SQL command within a variable varchar - sql server

Good afternoon. I need to write a command inside a variable of the varchar format Set @STRING_SQL = 'update BCS_RESOURCE set DS_DESCRICAO = ''Gestão de Contratos - ''+ @DS_PERFIL + '' , [DS_pt-BR] = ''Gestão de Contratos - '+ @DS_PERFIL + ', D...
asked by 03.03.2016 / 18:47
4
answers

How to bring records of a LEFT JOIN even if it does not obey WHERE?

For example, I have tabela_A : cod nome 1 stack 2 overflow 3 stackoverflow and tabela_B : cod_tabela_A ano mes valor 1 2016 1 100 1 2016 2 115 2...
asked by 04.03.2016 / 17:42