Advanced Querying

SQLServerCentral Article

NULL Column Analysis

  • Article

NULL values in columns can indicate a few things, the value isn't known, it's not yet been filled in, or perhaps, as Leo Peysakhovich argues, the column isn't being used? How many SQL Server tables do you have with extra tables and columns that are not being used? Or maybe never have been? This article looks at a statistical analysis of columns using NULLs to determine if you might be able to remove certain columns.

5 (2)

You rated this post out of 5. Change rating

2004-08-25

9,320 reads

SQLServerCentral Article

How To Find SQL Server Objects

  • Article

SQL Server can grow to encompass hundreds of databases on a single server, each having hundreds or thousands of objects within it. A truly scalable RDBMS. However, how many times have you been searching through the Object Browser in QA or the left pane in Enterprise Manager searching for an object? New Author Ashish Kaushal gives us a method to easily search your server for that long lost object.

4 (4)

You rated this post out of 5. Change rating

2004-08-17

19,362 reads

SQLServerCentral Article

Conditional Statements in WHERE Clauses

  • Article

T-SQL is a powerful language, enabling you to handle many different types of set based operations. But having flexible WHERE clauses isn't something that many DBAs deal with on a daily basis. New Author Sotiris Filippidis brings us an article on how you can structure a WHERE clause to handle all types of strange business logic without using dynamic SQL. Read on to learn more about his technique.

3.62 (53)

You rated this post out of 5. Change rating

2007-09-28 (first published: )

40,088 reads

SQLServerCentral Article

Making good use of Sysforeignkeys table -- Part 2 Check Table Relation

  • Article

Using sysforeignkeys to discover SQL Server circular relationships. Have you ever tried this? Most of us probably haven't, but Jeffrey Yao often needs to reverse engineer databases for his clients. Here's a followup to his first article where he presents another of his techniques for doing a little detective work in your databases.

You rated this post out of 5. Change rating

2004-06-30

7,113 reads

SQLServerCentral Article

Extracting a String From Between Two Delimiting Characters

  • Article

String manipulation in SQL Server or T-SQL can be a challenage. There are multiple ways to accomplish every task and often learning a new one may spark some creativity in yourself or teach you a better way to accomplish an old task. New Author Stephen Lasham brings us his technique for extracting a string that is delimited from within a larger string. Something I'm sure we'll all have use for in the future.

3.67 (3)

You rated this post out of 5. Change rating

2004-06-14

23,096 reads

SQLServerCentral Article

Be Prepared - Part 2

  • Article

Error handling in SQL Server 2000 is tricky. And it isn't the most robust system in the world. Stefan Popovski started a series on error handling using @@error and xact_abort. Here's the second installment of this series looking at error handling in nested stored procedures.

You rated this post out of 5. Change rating

2004-06-08

10,034 reads

SQLServerCentral Article

Be Prepared

  • Article

The error handling in SQL Server leaves something to be desired, especially compared with other RDBMSes and languages. The standard method of testing for errors can leave your code bloated and hard to read. Stefan Popovski looks at another method of handling errors.

5 (1)

You rated this post out of 5. Change rating

2004-04-21

8,362 reads

Blogs

Advice I Like: Fear and Imagination

By

Fear is fueled by a lack of imagination. The antidote to fear is not...

Cloud Data Driven User Group 2025 – Slides & Scripts

By

The slidedeck and the SQL scripts for the session Indexing for Dummies can be...

Leading Through Change: Guiding Teams in Times of Uncertainty

By

Change is not a disruption in technology; it is the rhythm. New frameworks appear,...

Read the latest Blogs

Forums

Show/Hide number of rows in table

By marty.seed

We have a report that has multiple tables that list the top 15 performers...

Replication from IBMi DB2 to MS SQL

By homebrew01

We have a tool called DB Moto that reads journals (like t-logs) and replicates...

Don't Forget About Financial Skills

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Don't Forget About Financial Skills

Visit the forum

Question of the Day

Checking Identities

The DBCC CHECKIDENT command is used when working with identity values. I have a table with 10 rows in it that looks like this:

TravelLogID CityID  StartDate   EndDate
1           1       2025-01-11  2025-01-16
2           2       2025-01-11  2025-01-16
3           3       2025-01-11  2025-01-16
4           4       2025-01-11  2025-01-16
5           5       2025-01-11  2025-01-16
6           6       2025-01-11  2025-01-16
7           7       2025-01-11  2025-01-16
8           8       2025-01-11  2025-01-16
9           9       2025-01-11  2025-01-16
10          10      2025-01-11  2025-01-16
The docs for DBCC CHECKIDENT say this if I run with only the table parameter: "If the current identity value for a table is less than the maximum identity value stored in the identity column, it is reset using the maximum value in the identity column. " I run this code:
DELETE dbo.TravelLog WHERE TravelLogID >= 9
GO
DBCC CHECKIDENT(TravelLog, RESEED)
GO
INSERT dbo.TravelLog
(
    CityID,
    StartDate,
    EndDate
)
VALUES
(4, '2025-09-14', '2025-09-17')
GO
What is the identity value for the new row inserted by the insert statement above?

See possible answers