Refactoring and static code analysis tool for SQL Server
Got a SQL Server or .NET question? Discuss it in the forums. (SQL Server Forums | Dot NET Forums)
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.

SQL Server - Server-side paging with Row_number() function

Most application does some sort of paging on the client side to display only a certain number of rows to the user. For the best performance, this type of applications want to retrieve only the information needed for the current page from the database. This post explains how to write this type of queries....

SQL Server FILESTREAM feature and Differential Backups

This post tries to explain the behavior of differential backups on a FILESTREAM enabled database. A number of times, I see questions looking for a confirmation whether Differential Backups will correctly backup the NTFS (FILESTREAM) files and restore...

Getting started with PIVOT Queries in SQL Server 2005/2008

This post intends to help TSQL developers get started with PIVOT/CROSS TAB queries. Most business applications will need some sort of PIVOT queries and I am sure many of you must have come across pivoting requirements several times in the past. Let us...

Backup of a FILESTREAM database may include garbage files as well

This post is based on the observation that the backup of a FILESTREAM database includes garbage files as well. The repro example given in this post demonstrates that....

XQuery Lab 62 – Revisiting simple TSQL SELECT operations using XQuery

This post aims to be a quick reference source for the beginners and shows a few simple SELECT examples....

Using the XMLTable() Function

A few weeks back, I published a function named XMLTable() that helps to query XML documents easily. The idea behind the function is to be able to blindly query XML documents just like you do a ‘SELECT *’ on a relational table. Not only that this function...

XQuery Lab 57 – Getting Started with OPENXML

This post intends to help you get started with OPENXML() function. OPENXML() lets you shred an XML document or fragment into a result set. Though OPENXML() has got no direct relationship with XQuery, I thought of including it in the XQuery Labs series...

FILESTREAM directory structure - where do the GUIDs come from?

One of the questions that might come to your mind while getting started with FILESTREAM is the way FILESTREAM directories and files are named. Within the FILESTREAM Data Container, SQL Server creates a root folder per FILESTREAM enabled table. If the...

SQL Server – Issues with generating XML using string operations

The results of a SQL Server SELECT query can be transformed into an XML document by using the FOR XML command. Building XML documents using string functions – concatenating XML tags and embedding values between them using string operations – is not a...

FOR XML Workshop – Understanding FOR XML AUTO

An XML document can be generated from the result of a SQL Server relational query using FOR XML. FOR XML can be  used along with AUTO, RAW, PATH or EXPLICIT directives which offer different levels of control over the structure of the XML output....

XQuery Lab 53 – Reading information from SQL Server Extended Event Information XML

This installment of XQuery Labs explains how to read information from the XML document generated by SQL Server Extended Events....

Completely Removing FILESTREAM features from a SQL Server 2008 database

Configuring a software feature is usually much harder than removing it. Most of the times, removing a feature could be just a matter of a mouse click or a simple command/statement. So what do you think about this question? Enabling FILESTREAM storage...

What is the FILESTREAM access level on your server instance? Oh I have got a “3”

Excepts from a conversation between Sumit and Leena, that I overheard last week. Don’t know who they are?? Never mind, I will introduce them later! Leena : “Sumit, I am playing with the FILESTREAM access level and I am bit confused as I am getting a ...

SQL Server – How to load data into a FILESTREAM enabled column using TSQL?

“Well, when accessing from TSQL, FILESTREAM enabled columns are not different from other regular columns and the code is not different from the regular code that you write”. This used to be my usual answer to people who ask me this question. I also had...

SQL Server - How to find out the SEED and INCREMENT values of an IDENTITY column?

Every IDENTITY column has two basic attributes: SEED and INCREMENT. The SEED attribute stores the ROOT or Starting value. INCREMENT specifies the value to be added to the current IDENTITY value to generate the next value. The default value of both these...
More Posts Next page »

Copyright © Beyondrelational.com