|
|
-
|
|
If you are a programmer working with SQL Server, you must have found it little embarrassing to display information which spans across multiple pages (web pages). SQL Server 2000 did not allow you to retrieve a specific range of records, say, records 51 to 100 ordered by a certain column.
For exa......
|
|
-
|
|
Error handling is very important for any serious application. It is very crucial that the application is capable of detecting the errors and take corrective measures to the maximum possible extend. If the error situation is beyond the control of the application, it should report the situation to the......
|
|
-
|
|
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 them correctly when a differential backup is rest......
|
|
-
|
|
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 say for example we need a result set as foll......
|
|
-
|
|
This post shows a quick and dirty way of loading a huge file into the FILESTREAM column of a SQL Server 2008 database instance. Note that this is an unsupported method which is not recommended on a production server. The correct way of loading BLOB data into a FILESTREAM column The right way of l......
|
|
-
|
|
I have been playing with FILESTREAM backups for a book that I am writing and came across something that I did not really like. I observed that a FILESTREAM backup may include garbage files which gets restored along with the database. What are garbage files? Let us understand what are garbage file......
|
|
-
|
|
Almost every business application I have worked with, needed some sort of paging requirement to display information in the presentation layer. At any point of time, users will be looking at a small number of records (say 25 or 50) in most cases. Some of the applications I have worked with, did the p......
|
|
-
|
|
This post aims to be a quick reference source for the beginners and shows a few simple SELECT examples. Reading attributes from an XML variable DECLARE @x XML
SET @x = ''
SELECT
@x.value('(/author/@fname)[1]', 'VARCHAR(20)') AS FirstName,
@x.value('(/author/@lname)[1]', 'VARCH......
|
|
-
|
|
We have seen several examples of writing recursive queries in the earlier blog posts. For a quick recap, you can find some of those posts in the list given below. TSQL Lab 10 - Performing recursive updates in SQL Server TSQL Lab 11 - Writing a recursive procedure to update the count of chil......
|
|
-
|
|
This installment of XQuery Lab shows how to execute dynamic queries that contain OPENXML() calls. We will see examples that use EXEC() and sp_executesql. Using EXEC() Let us start with EXEC(). DECLARE @hdoc INT
DECLARE @xml VARCHAR(MAX)
SELECT @xml = '
'
EXEC('
DECLARE @h......
|
|