SQL Persisted Computed Column ANSI_NULLS

0
I had to recreate a table in SQL Server just because it was created with ANSI_NULLS ON Here you can check the requirements to create a persisted  computed column on...

Recursive Queries in SQL Server 2005

0
For building recursive queries In SQL Server 2005 we have to use a new functionality called Common Table Expressions. Let's see how we can retrieve all the employees that...

Full-Text Search: Actualizar múltiplos cátalogos de pesquisa

0
Introdução O Sql Server possui um mecanismo de pesquisa de texto com base na indexação de colunas de tabelas numa base de dados chamado Full-Text Search. Este mecanismo de pesquisa...

Enterprise Library: Criar ligação à base de dados de forma dinâmica

0
Já alguma vez precisaram, usando o Enterprise Library, de estabelecer uma ligação com um número de base de dados variável e em que a base de dados a ligar...

Converting a Vertical Table to an Horizontal Table in SQL Server

2
Today I've encountered a vertical table in an SQL Database and I wanted to transform it to an horizontal one. A vertical table is described as an EAV model. Imagine...

.NET EF Core 6 support for groupby top(n) queries

0
EF Core 6 comes with some GroupBy queries improvements. In this post I wanna talk about the improvements related to "group by top(n)" queries. Let's say we have the following...

Reset Identity value

Today, i needed to reset the Identity value for one column in the SQL Server database. I used the following commando to view the current identity value: ...

How to Access the Previous Row and Next Row value in SELECT statement?

0
LAG - http://msdn.microsoft.com/en-us/library/hh231256.aspx USE AdventureWorks2012; GO SELECT BusinessEntityID, YEAR(QuotaDate) AS SalesYear, SalesQuota AS CurrentQuota, LAG(SalesQuota, 1,0) OVER (ORDER BY YEAR(QuotaDate)) AS PreviousQuota FROM Sales.SalesPersonQuotaHistory WHERE BusinessEntityID = 275...

Query performance for JSON objects inside SQL Server using JSON_VALUE function

6
Following up on this article about querying JSON Data I would like to talk about how to improve searches on JSON data inside SQL Server. Starting SQL Server 2016...

Entity Framework – Update Database using Azure Pipelines

Introduction The pipelines bring to us the opportunity to create automatic tasks to execute development operations, like deploys, migrations, tests, etc. Focused in the deploy routine, some applications need other...