Questions tagged as 'sql-server'

2
answers

How do I transpose a search result using SQL Server?

Or rather telling you how to make the columns of the result of a SQL Server search result become the result lines, as follows in the images below: A search result using the select clause: Maketheresultlooklikethis: Note: Remember...
asked by 04.02.2016 / 16:46
1
answer

How does SqlBulkCopy work?

I am using the SqlBulkCopy class for do the bulk data insertion. Everything has worked perfectly, but in recommending this to my co-workers, while proving efficiency, they questioned how it works. In my searches, I could see that S...
asked by 06.06.2016 / 19:06
1
answer

Error converting varchar value to integer

When performing the following UPDATE through my API (.NET Core): UPDATE Aula SET WHATEVER = WHATEVER WHERE ID_AULA = @examID Code: string query = builder .AppendLine("UPDATE Aula") .AppendLine("SET WHATEVER = WHATEVER")...
asked by 10.05.2018 / 18:47
1
answer

Only positive numbers in sum aggregation

In this query, in% w_that I would like to add only positive numbers, is there any way to do this? SELECT orcdotac.conta_desp ,orcplade.descricao ,orcplade.complemento ,SUM(orcdotac.sld_orc_ano) AS CREDITOS_ORCAMENTA...
asked by 05.06.2018 / 21:04
1
answer

How to map a TIME-type column in Entity Framework 6?

I'm using this mapping for a DATETIME field of SQL Server: Property(X => X.DatNascimento).HasColumnName("DAT_NASCIMENTO").HasColumnType("datetime"); But I have another TIME field that I do not know how to configure: Property(X => X....
asked by 05.06.2015 / 15:45
2
answers

Keep records of synchronized tables between two different databases

We are performing a system migration, where some restructurings will be made in the current bank in a new bank. Basically I will have two banks BancoVelho and BancoNovo , having to keep the two updated according to the mapping of th...
asked by 22.04.2016 / 21:22
1
answer

What are the SQL Server Express and MySQL limits?

What are the limits of SQL Server Express and MySQL? How many bases are possible? How big is each base? The size of index files?     
asked by 16.07.2015 / 16:49
2
answers

CONSTRAINT that adds parameter to FOREIGN KEY?

I have the following code for creating tables: CREATE TABLE pessoa ( cod_pessoa int NOT NULL IDENTITY PRIMARY KEY, nm_pessoa varchar (50) NOT NULL, tp_pessoa char(1) NOT NULL, endereco_pessoa varchar(50) NOT NULL, CONSTRAINT pessoa_tipo CHECK...
asked by 26.11.2014 / 18:10
4
answers

SQL Home Time (Years, months and days) [duplicate]

I need to create a function in SQL that returns employee's time, for example: years , months and days So far I've been able to bring the years and months , but I could not reach the day's logic yet, / p> DECLARE @DTINI DATE, @DTFI...
asked by 30.12.2015 / 12:58
1
answer

How do I create scheduled events in SQL Server, similar to MySQL event?

In MySQL I used this syntax to create a scheduled event: CREATE EVENT 'evento_LimparPaper' ON SCHEDULE EVERY 1 MONTH STARTS '2014-06-3 00:00:01' ON COMPLETION NOT PRESERVE ENABLE COMMENT '' DO BEGIN UPDATE 'tbl_Paper' SET capa='mudar'; END...
asked by 02.07.2014 / 21:06