SQL Puzzles

SET ROWCOUNT and TVFs

  • Article

SQL Server 2000 has table valued functions that are very useful in many ways. However when you try to limit results with the ROWCOUNT setting, you can end up with some strange results. Peter He brings us a comprehensive look at some of the unpredictable results that you can get and how to code around them.

2005-12-21

10,032 reads

Quick Hints for using the RAISERROR Command

  • Article

SQL Server 2000 error handling isn't the most mature system for dealing with unexpected events. It has been much enhanced in SQL Server 2005, but many people will be using SQL Server 2000 for a long time. RAISERROR is one of those functions that can really aid in troubleshooting, but is often underutilized. David Poole brings us some hints on how this can help you out in your code.

4.6 (5)

2005-11-23

18,683 reads

An Audit Trail Generator

  • Article

Auditing is becoming more and more important in many SQL Server environments. DBAs are being tasked with setting up, maintaining, and reporting on audit data. Author Leo Peysakhovich brings us one of his solutions to automatically generate an audit trail for your data.

4.83 (6)

2005-10-10

22,612 reads

An Is Null Gotcha

  • Article

In T-SQL you should use the IS NULL keywords to test for a null value. But David Poole runs into a strange gotcha in one of his applications where he is testing for a null value. It's an interesting read following Sherlock Poole around on his hunt to find an error.

4.75 (4)

2004-07-14

11,689 reads

Blogs

Azure Data Engineer Associate

By

You can read about all the new role based qualifications from Microsoft here –...

Social: Going Along to Get Along

By

It’s the eve of the Fourth of July, when the Declaration of Independence is...

Daily Coping 3 Jul 2020

By

I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

Update table and then executeJob in loop

By khushbu

I need to write a query which will first update the table, then execute...

Using two different backup products for each of data and log

By Fal

  To shorten a long story, my organisation has decided to have a vendor...

Compare sql-2012 and sql-2016 settings

By rohitkocharda

Hi everyone, W are just doing a migration from sql 2012 enterprise  to sql...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers