Questions tagged as 'sql-server-2012'

2
answers

How to do a Code First migration without deleting data from the table attribute?

I need to change the name of the Weight attribute to Product Weight , this is the code that is generated after running the add-migration command: namespace Web.Dominio.Migrations { using System; using System.Data.Entity.Migrations...
asked by 30.10.2016 / 20:09
2
answers

Error: Can not find data type long

I'm trying to create a procedure in SQL Server 2012, but it's giving the following error in signing it. Mensagem 2715, Nível 16, Estado 3, Procedimento MINHAPROCEDURE, Linha 6 Column, parameter, or variable #1: Cannot find data type long. Para...
asked by 27.09.2015 / 17:24
2
answers

Best high availability path for my needs

I have studied a lot about high availability in SQL Server, in its many options, that SQL Server has. But so far I have not been able to find the solution that best meets my needs. My scenery: I need to serve a chain of stores, in the case...
asked by 16.03.2015 / 14:01
2
answers

SQL Query - put result on a row only

SELECT pga.Titulo, e.Codigo FROM Qualidade_Diagrama_Processo_Grupo_Acao pga JOIN Qualidade_Diagrama_Acao_Entidade ae on (ae.Id_Proc_Grupo_Acao = pga.Id) JOIN Qualidade_Diagrama_Entidade e on (e.Id = ae.Id_Entidade) WHERE ae.Id_Pro...
asked by 04.07.2018 / 14:38
2
answers

How to extract in a string the date-time of a given XML field - SQL Server 2012 Query

Good afternoon! Personal, in my table log has a field called logdescricao and in this field it stores several expressions. For example: <log expressao="7085"><par traduzir="N">André Mariano da Silva</par><par traduzir="...
asked by 05.09.2017 / 19:38
1
answer

A cursor within another sqlserver cursor

I know I could do a join of tab1 with tab2, but that would not be the case, I need the two cursors. When I run I get the error: A cursor with the name 'cursor_tab2 ' already exists. The cursor is already open. I even understand the erro...
asked by 07.05.2015 / 19:48
1
answer

SQL Server 2012 / BCP crashing - unexpected EOF

I want to upload some data files from the Ministry of Education (Microdata of the Census of Higher Education 2012) in my SQL Server 2012 Express. The data is in fixed column files generated by some program written in Fortran. I created a...
asked by 10.08.2015 / 18:03
1
answer

SqlServer 2012 - Column '' in table '' is of a type that is invalid for use as a key column in an index

After seeing this error when creating a NONCLUSTERED index I wondered if it would really be necessary to create this index in the following scenario: I have a table with 11 columns, a column I store a URL, ie it is a column nvarchar(300)...
asked by 14.05.2015 / 22:59
1
answer

How to use LEAD and LAG using a condition

My question is, if I can use LAG and LEAD, using a condition in the query, for example: I have the zip column .. I want to get the value of the next line, and the value of the previous line in that same column. I'm working with C # and SQL...
asked by 29.04.2014 / 18:38
1
answer

Doubt - Insert table SQL Server 2012

I need to insert some information in the table called task, however, only when a certain condition is accepted that in the case are these two date fields, I put it to today for example if it were manual, that is, it would insert into the system...
asked by 05.10.2017 / 14:25