Articles

SQLServerCentral Article

Visual Defrag for SQL Server Discount

How often do you check your SQL Server tables for fragmentation? How often do you defragment them? This is one of those technologies that has been available for disks for a long time, but now is here for SQL Server. Norb Technologies is offering a discount to the SQLServerCentral.com community on this product.

You rated this post out of 5. Change rating

2005-11-01

4,107 reads

Technical Article

Loving to Hate the Data Administrator

You can just hear it now: At the table down the hall, there’s a group of people having, (as it seems to you) yet another academic discussion on the merits of third-normal form and the structure of primary keys. You’ve heard many discussions like this before — it all seems so pointless. After all, doesn’t it just boil down to “create table” commands and a bunch of DDL? You mastered all that in your first DBA class. What could be so hard?

2005-10-31

3,688 reads

SQLServerCentral Article

Simplify the Creation of XML from SQL Server Data

SQL Server 2000 had extensions built in to allow you to work with XML data, however, most installations did not work with it. XML has proven that it is a very powerful way of transmitting and working with data, but creating it from relational data has proven to be difficult. New author Hugh Lynch, CTO of Restricted Stock Systems, Inc. brin gs us a method for easily creating XML from your SQL Servers.

You rated this post out of 5. Change rating

2005-10-27

10,475 reads

Technical Article

Accurate Numeric Identifiers: Using Verhoeff's Method for Check Digits

Check digits–not to be confused with checksums–are often added to numeric identifiers such as customer and product numbers to reduce the chance of incorrect entries. Sequences of numbers are notoriously easy to mistype, and constraints alone generally won't do the job. In this excellent article, Lynn Fields shows you how to implement the "Cadillac" of check digit methods–the Verhoeff Dihedral Group.

2005-10-26

2,735 reads

Blogs

The Book of Redgate: We Value Teams

By

This value is something that I still hear today: our best work is done...

Troubleshooting TempDB Log Full Errors When SSMS Won’t Connect

By

Have you ever received the dreaded error from SQL Server that the TempDB log...

Accelerating AI with Confidence: Why Microsoft Purview is Key to Responsible Innovation

By

Artificial intelligence is no longer a distant concept. It is here, embedded in the...

Read the latest Blogs

Forums

Is there a way for SP to know who called it?

By water490

Hi everyone I am writing an SP where there is logic inside the SP...

Planning for tomorrow, today - database migrations

By John Martin

Comments posted to this topic are about the item Planning for tomorrow, today -...

Bottlenecks on SQL Server performance

By runarlan

We have a BI-application that connects to input tables on a SQL Server 2022...

Visit the forum

Question of the Day

The Tightly Linked View

I try to run this code on SQL Server 2022. All the objects exist in the database.

CREATE OR ALTER VIEW OrderShipping
AS
SELECT cl.CityNameID,
       cl.CityName,
       o.OrderID,
       o.Customer,
       o.OrderDate,
       o.CustomerID,
       o.cityId
 FROM dbo.CityList AS cl
 INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID
GO
CREATE OR ALTER FUNCTION GetShipCityForOrder
(
    @OrderID INT
)
RETURNS VARCHAR(50)
WITH SCHEMABINDING
AS
BEGIN
    DECLARE @city VARCHAR(50);
    SELECT @city = os.CityName
    FROM dbo.OrderShipping AS os
    WHERE os.OrderID = @OrderID;
    RETURN @city;
END;
go
What is the result?

See possible answers