Advanced Querying

SQLServerCentral Article

Scripted Server Snapshot

  • Article

Users call and complain and by the time you get to the server, everything looks fine. Even running Profiler sometimes doesn't capture the information. Author Roy Carlson found a solution, a script that you can give to users to dump whatever information you need to an Excel file.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-07-12

8,735 reads

SQLServerCentral Article

Replacing Cursors and While Loops

  • Article

Get some big performance gains by removing cursors from your code. New author Clinton Herring brings us a couple hints as he shows how two cursors were replaced in his code, resulting in 80 minutes of processing time dropping to 12!

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(7)

You rated this post out of 5. Change rating

2006-04-07 (first published: )

50,122 reads

SQLServerCentral Article

Another DBA Whoops

  • Article

Two in a month? Steve Jones brings us another mistake made by a DBA in SQL Server. Everyone makes them and we may not like to admit to them, everyone that we print hopefully helps a few other SQL Server DBAs avoid that particular mistake. This one looks at the dangers of sorting by aliases.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-07-06

13,523 reads

SQLServerCentral Article

Gotcha! SQL Aggregate Functions and NULL

  • Article

Working with NULL functions can be tricky in T-SQL and SQL Server 2000. If you add in aggregates, you need to be sure you understand what the behavior will be or you might report incorrect values to a user. Michael Coles has written a new article that talks about how NULL affects your results.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(58)

You rated this post out of 5. Change rating

2008-04-04 (first published: )

106,602 reads

SQLServerCentral Article

Four Rules for NULLs

  • Article

In SQL Server 2000 or any relational database, the concept of NULL can be both confusing and hazardess to your employment. Not understanding how to work with NULLs can lead to incorrect responses to queries and poor business decisions being made. New author Michael Coles brings us four rules that can help you work with NULL values in your tables.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(99)

You rated this post out of 5. Change rating

2008-03-28 (first published: )

95,216 reads

SQLServerCentral Article

The ARRAY In SQL Server 2000

  • Article

SQL Server 2000 and Transact-SQL have many features, but one of the most often asked for features has been the implementation of some sort of array data type. This basic programming concept is notably absent from the development platform and results in many headaches and frustrations for DBAs. New author Alex Grinberg brings us his techniques for simulating arrays in SQL Server 2000.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(50)

You rated this post out of 5. Change rating

2008-02-15 (first published: )

145,229 reads

Technical Article

How to Check the Status of a File Before Processing

  • Article

SQL Server Database administrators often copy(refer Fig 1.0) huge files, such as Full backup files and transaction log backup files from production to QA or from production to development environment and so on. Sometimes they need to copy source data files for importing. If they want to restore those Full backups or transaction log backup files or import those huge source files, they have to wait until the copy is complete.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-05-06

2,909 reads

SQLServerCentral Article

Know Your Data

  • Article

Or at least the types of your data. New author Roy Carlson was working in SQL Server 2000 to calculate some values based on row counts, sales amounts, etc. and discovered some interesting results. Without his sharp eye, a number of individuals would have been upset by the resulting lack of commissions, as may some of your clients. Read about some potential problems in your calculations if you are not careful with your data types.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-04-04

6,692 reads

SQLServerCentral Article

Performance Tips Part 1

  • Article

SQL Server 2000 is a self tuning, self balancing application that performs wonderfully under a wide variety of loads and conditions with a minimal of administrative tuning. However there are some things that you can do when building T-SQL code and working with SQL Server to maximime performance and assist the query optimizer in selecting the best query plans. Leo Peysakhovich brings us the first part of his series looking at some different scenarios and how you can structure your code to achieve

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-03-08

16,498 reads

Technical Article

The HAVING and GROUP BY SQL clauses

  • Article

This month's topic is one that often baffles inexperienced SQL coders. We will look at the GROUP BY clause, and then the difference between conditions placed in the WHERE clause, and the HAVING clause. I have used MySQL to test all of the examples, but most of them should work without any problems on other DBMS' too.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-02-16

4,182 reads

Blogs

AI Center of Excellence: How to build one in 90 days

By

A practical guide to building an AI Center of Excellence, from choosing the right...

Monday Monitor Tips: Cloud Migration

By

We added costing information awhile back to Monitor for your cloud VM estate. We’ve...

Word to the wise: don’t turn on SQL vulnerability checks on a blog about SQL

By

Recently, in an attempt to thwart leechers (1990s kids will know), I added some...

Read the latest Blogs

Forums

The Speed of Count

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Speed of Count

Detecting Outliers in Power BI Using IQR

By Dinesh Asanka

Comments posted to this topic are about the item Detecting Outliers in Power BI...

Moving to a New Platform

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Moving to a New Platform

Visit the forum

Question of the Day

The Speed of Count

Which of these might run quicker on the AdventureWorks database in SQL Server 2025?

-- A
select count(*) from AdventureWorks.Sales.OrderDetail

-- B
select count(1) from AdventureWorks.Sales.OrderDetail

-- C
select count(OrderDetailID) from AdventureWorks.Sales.OrderDetail

See possible answers