SQLServerCentral Article

SMO Basics

SQL Server guru Andy Warren has been working with all aspects of SQL Server for many years and is slowly upgrading his skills to SQL Server 2005. Here he takes a look at SMO basics, which is the replacement for DMO.

External Article

Creating usable applications

If I had a penny for every person who said "usability is just common sense", I'd have a pretty reasonable stack of pennies – maybe 30 or so. Clearly I'm not going to be able to retire on this, but at least it demonstrates that many people have misconceptions about how usable interfaces are designed.

Technical Article

Working with TempDB

This white paper describes how SQL Server 2005 uses tempdb. Many improvements in SQL Server 2005 optimize tempdb usage and make it easier to manage and to troubleshoot. A case study that uses a workload similar to TPC Benchmark H (TPC-H) shows new ways to manage and troubleshoot tempdb resources. This paper also includes items to consider when upgrading to SQL Server 2005 and configuring tempdb

SQLServerCentral Article

Attach and Detach..Again

Attaching and detaching databases is old hat these days right? Do you know how to reattach a database that has more than 16 files? Or do you know what happens if you try to reattach a database that had two log files but one is missing/deleted? And even if you know the answer to that - do you know how to fix it without restoring from backup? Maybe it's not ALL old hat just yet!

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

Bottlenecks on SQL Server performance

By runarlan

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

Is there some good routines for updating SQL Server database objects with GitHub

By Rod at work

At work we've been getting better at writing what's known as GitHub Actions (workflows,...

The Tightly Linked View

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Tightly Linked View

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